Commit 4fabcbfb authored by Alan Mackenzie's avatar Alan Mackenzie

Fix debbugs#20240 part two (jit-lock error during `comment-dwim').

jit-lock.el (jit-lock-after-change): Widen the buffer before
putting 'fontified text properties.
parent 4de97eaf
2015-04-04 Alan Mackenzie <acm@muc.de>
Fix debbugs#20240 part two (jit-lock error during `comment-dwim').
* jit-lock.el (jit-lock-after-change): Widen the buffer before
putting 'fontified text properties.
2015-04-03 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cache.el (tramp-flush-file-property)
......
......@@ -650,12 +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
(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))
(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)))
;; Mark the change for deferred contextual refontification.
(when jit-lock-context-unfontify-pos
(setq jit-lock-context-unfontify-pos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment