* Re: [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim').
[not found] ` <E1YeLOK-0003dA-EL@vcs.savannah.gnu.org>
@ 2015-04-04 13:56 ` Stefan Monnier
2015-04-04 14:18 ` Alan Mackenzie
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-04-04 13:56 UTC (permalink / raw)
To: emacs-devel; +Cc: Alan Mackenzie
> - (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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim').
2015-04-04 13:56 ` [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim') Stefan Monnier
@ 2015-04-04 14:18 ` Alan Mackenzie
0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2015-04-04 14:18 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Hello, Stefan.
On Sat, Apr 04, 2015 at 09:56:56AM -0400, Stefan Monnier wrote:
> > - (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.
Sorry, misunderstanding there. I'll change it (just as soon as I can
build).
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-04 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150404103328.13918.94798@vcs.savannah.gnu.org>
[not found] ` <E1YeLOK-0003dA-EL@vcs.savannah.gnu.org>
2015-04-04 13:56 ` [Emacs-diffs] master 4fabcbf: Fix debbugs#20240 part two (jit-lock error during `comment-dwim') Stefan Monnier
2015-04-04 14:18 ` Alan Mackenzie
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.