lang/org: fix #2117 regression

This commit is contained in:
Henrik Lissner 2019-12-02 20:28:55 -05:00
parent 153fbbc466
commit 7cec80e9f1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -524,17 +524,16 @@ conditions where a window's buffer hasn't changed at the time this hook is run."
"Remove link syntax and fix variable height text (e.g. org headings) in the "Remove link syntax and fix variable height text (e.g. org headings) in the
eldoc string." eldoc string."
:around #'org-format-outline-path :around #'org-format-outline-path
(let ((result (funcall orig-fn path width prefix separator)) (funcall orig-fn
(separator (or separator "/"))) (cl-loop for part in path
(string-join ;; Remove full link syntax
(cl-loop for part for part = (replace-regexp-in-string org-link-any-re "\\4" part)
in (split-string (substring-no-properties result) separator) for n from 0
for n from 0 for face = (nth (% n org-n-level-faces) org-level-faces)
for face = (nth (% n org-n-level-faces) org-level-faces) collect
collect (org-add-props part
(org-add-props (replace-regexp-in-string org-link-any-re "\\4" part) nil 'face `(:foreground ,(face-foreground face nil t) :weight bold)))
nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) width prefix separator))
separator)))
(defun +org--restart-mode-h () (defun +org--restart-mode-h ()
"Restart `org-mode', but only once." "Restart `org-mode', but only once."