GNU bug report logs -
#20240
25.0.50; CC Mode broken fontification and commenting
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Wed, 1 Apr 2015 10:52:01 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
Fixed in version 25.1
Done: Mark Oteiza <mvoteiza <at> udel.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Stefan and Mark.
On Fri, Apr 03, 2015 at 06:09:12PM -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)))
> Widening during the call to
> jit-lock-after-change-extend-region-functions seems wrong. But I guess
> there can be meaningful cases where
> jit-lock-after-change-extend-region-functions could return positions
> outside of the narrowed region, so I'd be OK with widening during the
> subsequent `put-text-property'.
Thanks. I've just committed that change.
Mark, would you please update your Emacs and build it again, then test
whether or not your bug has finally been fixed, then let us know. Then
I can close the bug. Thanks!
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 9 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.