]> git.eshelyaron.com Git - emacs.git/commitdiff
Tidy up fix to debbugs#20240.
authorAlan Mackenzie <acm@muc.de>
Sun, 5 Apr 2015 14:40:57 +0000 (14:40 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 5 Apr 2015 14:40:57 +0000 (14:40 +0000)
* jit-lock.el (jit-lock-after-change): Widen the buffer only
whilst putting the 'fontified text properties.

lisp/ChangeLog
lisp/jit-lock.el

index 7f2e9987fe57a001a172e773f825324fb58080a9..a780b08e49cfb67427a8ecedb623034ec5d63569 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-05  Alan Mackenzie  <acm@muc.de>
+
+       * jit-lock.el (jit-lock-after-change): Widen the buffer only
+       whilst putting the 'fontified text properties.
+
 2015-04-05  Alan Mackenzie  <acm@muc.de>
 
        Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.
index d5651c62811471498077ff6a2b60d51ec05ea54f..5f9196da645d97058880fcc01c76541dccbeabb4 100644 (file)
@@ -650,14 +650,14 @@ will take place when text is fontified stealthily."
     (let ((jit-lock-start start)
           (jit-lock-end end))
       (with-buffer-prepared-for-jit-lock
-          (save-restriction
-           (widen)
-           (run-hook-with-args 'jit-lock-after-change-extend-region-functions
-                               start end old-len)
-           ;; Make sure we change at least one char (in case of deletions).
-           (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max)))
-           ;; Request refontification.
-           (put-text-property jit-lock-start jit-lock-end 'fontified nil)))
+       (run-hook-with-args 'jit-lock-after-change-extend-region-functions
+                          start end old-len)
+       ;; Make sure we change at least one char (in case of deletions).
+       (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max)))
+       ;; Request refontification.
+       (save-restriction
+        (widen)
+        (put-text-property jit-lock-start jit-lock-end 'fontified nil)))
       ;; Mark the change for deferred contextual refontification.
       (when jit-lock-context-unfontify-pos
         (setq jit-lock-context-unfontify-pos