diff options
author | Alan Mackenzie <acm@muc.de> | 2015-04-05 14:40:57 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2015-04-05 14:40:57 +0000 |
commit | c1d18b1d59ef3f0d01c8a1112976241feba2f74a (patch) | |
tree | b16bdad5f7971cf7305a28ab5a3692de27c58b90 /lisp/jit-lock.el | |
parent | bf8194688ece7677083075b3a2443d9d1ac24e28 (diff) | |
download | emacs-c1d18b1d59ef3f0d01c8a1112976241feba2f74a.tar.gz |
Tidy up fix to debbugs#20240.
* jit-lock.el (jit-lock-after-change): Widen the buffer only
whilst putting the 'fontified text properties.
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r-- | lisp/jit-lock.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index d5651c62811..5f9196da645 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -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 |