1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Backport: Update Org to v9.1.4

Please note this is a bugfix release. See etc/ORG-NEWS for details.

(cherry picked from commit 567b5efe1f)
This commit is contained in:
Rasmus 2017-12-06 15:02:15 +01:00
parent 5381c70b7a
commit 445eefd238
31 changed files with 562 additions and 461 deletions

View file

@ -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)))