Remove `org-dwidth' and `org-dwidth-n' properties

* lisp/org.el (org-raise-scripts):
(org-display-custom-time): Remove `org-dwidth' and `org-dwidth-n'
properties.
This commit is contained in:
Nicolas Goaziou 2017-07-27 15:32:06 +02:00
parent 9a60db0ec3
commit 648b12d57d
1 changed files with 10 additions and 19 deletions

View File

@ -6644,17 +6644,13 @@ and subscripts."
(nth (if table-p 3 1) org-script-display)
(nth (if table-p 2 0) org-script-display)))
(add-text-properties (match-beginning 2) (match-end 2)
(list 'invisible t
'org-dwidth t 'org-dwidth-n 1))
(if (and (eq (char-after (match-beginning 3)) ?{)
(eq (char-before (match-end 3)) ?}))
(progn
(add-text-properties
(match-beginning 3) (1+ (match-beginning 3))
(list 'invisible t 'org-dwidth t 'org-dwidth-n 1))
(add-text-properties
(1- (match-end 3)) (match-end 3)
(list 'invisible t 'org-dwidth t 'org-dwidth-n 1)))))
(list 'invisible t))
(when (and (eq (char-after (match-beginning 3)) ?{)
(eq (char-before (match-end 3)) ?}))
(add-text-properties (match-beginning 3) (1+ (match-beginning 3))
(list 'invisible t))
(add-text-properties (1- (match-end 3)) (match-end 3)
(list 'invisible t))))
t)))
;;;; Visibility cycling, including org-goto and indirect buffer
@ -17306,24 +17302,19 @@ The command returns the inserted time stamp."
(defun org-display-custom-time (beg end)
"Overlay modified time stamp format over timestamp between BEG and END."
(let* ((ts (buffer-substring beg end))
t1 w1 with-hm tf time str w2 (off 0))
t1 with-hm tf time str (off 0))
(save-match-data
(setq t1 (org-parse-time-string ts t))
(when (string-match "\\(-[0-9]+:[0-9]+\\)?\\( [.+]?\\+[0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)?\\'" ts)
(setq off (- (match-end 0) (match-beginning 0)))))
(setq end (- end off))
(setq w1 (- end beg)
with-hm (and (nth 1 t1) (nth 2 t1))
(setq with-hm (and (nth 1 t1) (nth 2 t1))
tf (funcall (if with-hm 'cdr 'car) org-time-stamp-custom-formats)
time (org-fix-decoded-time t1)
str (org-add-props
(format-time-string
(substring tf 1 -1) (apply 'encode-time time))
nil 'mouse-face 'highlight)
w2 (length str))
(unless (= w2 w1)
(add-text-properties (1+ beg) (+ 2 beg)
(list 'org-dwidth t 'org-dwidth-n (- w1 w2))))
nil 'mouse-face 'highlight))
(put-text-property beg end 'display str)))
(defun org-fix-decoded-time (time)