From e279e98e774e37fd8bf908cca9fe75385194902d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 27 Sep 2012 23:40:28 +0200 Subject: [PATCH] org-src.el (org-src-font-lock-fontify-block): Fix bug: don't fontify the last character * org-src.el (org-src-font-lock-fontify-block): Fix bug: don't fontify the last character. --- lisp/org-src.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index c110f32c6..d3e343754 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -805,13 +805,13 @@ fontification of code blocks see `org-src-fontify-block' and (get-buffer-create (concat " org-src-fontification:" (symbol-name lang-mode))) (delete-region (point-min) (point-max)) - (insert (concat string " ")) ;; so there's a final property change + (insert string) (unless (eq major-mode lang-mode) (funcall lang-mode)) (font-lock-fontify-buffer) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (put-text-property - (+ start (1- pos)) (+ start next) 'face + (+ start (1- pos)) (1- (+ start next)) 'face (get-text-property pos 'face) org-buffer) (setq pos next))) (add-text-properties -- 2.11.4.GIT