[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock e
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim'). |
Date: |
Sat, 04 Apr 2015 09:56:56 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> - (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)))
Huh.. no, I said that widening during the call to
jit-lock-after-change-extend-region-functions was wrong. The widening
should only be around the put-text-property.
Stefan
- Re: [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim').,
Stefan Monnier <=