diff options
Diffstat (limited to 'lisp/org/org-macs.el')
-rw-r--r-- | lisp/org/org-macs.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 1118214c4f1..ff6d8c41d4b 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -51,8 +51,8 @@ Otherwise, return nil." SEPARATORS is a regular expression. When nil, it defaults to \"[ \f\t\n\r\v]+\". -Unlike to `split-string', matching SEPARATORS at the beginning -and end of string are ignored." +Unlike `split-string', matching SEPARATORS at the beginning and +end of string are ignored." (let ((separators (or separators "[ \f\t\n\r\v]+"))) (when (string-match (concat "\\`" separators) string) (setq string (replace-match "" nil nil string))) @@ -108,16 +108,15 @@ text properties." (value (if (stringp display) display (cl-some #'stringp display)))) (when value - (apply - #'propertize - ;; Displayed string could contain - ;; invisible parts, but no nested display. - (funcall prune-invisible value) - (plist-put props - 'display - (and (not (stringp display)) - (cl-remove-if #'stringp - display))))))))))) + (apply #'propertize + ;; Displayed string could contain + ;; invisible parts, but no nested + ;; display. + (funcall prune-invisible value) + 'display + (and (not (stringp display)) + (cl-remove-if #'stringp display)) + props)))))))) ;; `display' property overrides `invisible' one. So we first ;; replace characters with `display' property. Then we remove ;; invisible characters. @@ -125,7 +124,7 @@ text properties." (defun org-string-width (string) "Return width of STRING when displayed in the current buffer. -Unlike to `string-width', this function takes into consideration +Unlike `string-width', this function takes into consideration `invisible' and `display' text properties." (string-width (org-string-display string))) |