diff options
author | Aaron Jensen <aaronjensen@gmail.com> | 2017-03-19 23:55:51 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-03-19 23:55:51 +0100 |
commit | 0ccd8286a1973f3efc51c3ffe4329fa676e0e937 (patch) | |
tree | 30d67ff0524227676e91e543cd7785d42befe51a | |
parent | 10bd44db7b0f177f2914db6b49b8dbf5c644682f (diff) | |
download | org-mode-0ccd8286a1973f3efc51c3ffe4329fa676e0e937.tar.gz |
org-src: Fix fontification error
* lisp/org-src.el (org-src-font-lock-fontify-block): Fix fontification
error introduced in commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8.
TINYCHANGE
-rw-r--r-- | lisp/org-src.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el index a0ea285..109163e 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -525,19 +525,19 @@ as `org-src-fontify-natively' is non-nil." (let ((inhibit-modification-hooks nil)) (erase-buffer) ;; Add string and a final space to ensure property change. - (insert string " ") - (unless (eq major-mode lang-mode) (funcall lang-mode)) - (org-font-lock-ensure) - (let ((pos (point-min)) next) - (while (setq next (next-property-change pos)) - ;; Handle additional properties from font-lock, so as to - ;; preserve, e.g., composition. - (dolist (prop (cons 'face font-lock-extra-managed-props)) - (let ((new-prop (get-text-property pos prop))) - (put-text-property - (+ start (1- pos)) (1- (+ start next)) prop new-prop - org-buffer))) - (setq pos next))))) + (insert string " ")) + (unless (eq major-mode lang-mode) (funcall lang-mode)) + (org-font-lock-ensure) + (let ((pos (point-min)) next) + (while (setq next (next-property-change pos)) + ;; Handle additional properties from font-lock, so as to + ;; preserve, e.g., composition. + (dolist (prop (cons 'face font-lock-extra-managed-props)) + (let ((new-prop (get-text-property pos prop))) + (put-text-property + (+ start (1- pos)) (1- (+ start next)) prop new-prop + org-buffer))) + (setq pos next)))) ;; Add Org faces. (let ((src-face (nth 1 (assoc-string lang org-src-block-faces t)))) (when (or (facep src-face) (listp src-face)) |