diff options
-rw-r--r-- | lisp/org/org-src.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index a02402cf60e..16aa443232f 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -918,15 +918,15 @@ fontification of code blocks see `org-src-fontify-block' and ;; from `jit-lock-function' (Bug#25132). (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) - (insert string " ") ;; so there's a final property change - (unless (eq major-mode lang-mode) (funcall lang-mode)) - (org-font-lock-ensure) - (setq pos (point-min)) - (while (setq next (next-single-property-change pos 'face)) - (put-text-property - (+ start (1- pos)) (1- (+ start next)) 'face - (get-text-property pos 'face) org-buffer) - (setq pos next)))) + (insert string " ")) ;; so there's a final property change + (unless (eq major-mode lang-mode) (funcall lang-mode)) + (org-font-lock-ensure) + (setq pos (point-min)) + (while (setq next (next-single-property-change pos 'face)) + (put-text-property + (+ start (1- pos)) (1- (+ start next)) 'face + (get-text-property pos 'face) org-buffer) + (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) |