GNU bug report logs -
#56682
Fix the long lines font locking related slowdowns
Previous Next
Full log
Message #430 received at 56682 <at> debbugs.gnu.org (full text, mbox):
> IIUC, what Stefan suggests is the following, which seems (almost) fine to
> me. The only problem I see is that jit-lock-function is not the only user
> of fontication-functions. It has at least two other users: in ELPA
> multi-mode.el sets fontification-functions to multi-fontify, and in MELPA
> poly-lock.el sets fontification-functions to poly-lock-function.
Good point.
> @@ -4412,9 +4412,9 @@ handle_fontified_prop (struct it *it)
> ptrdiff_t begv = it->narrowed_begv ? it->narrowed_begv : BEGV;
> ptrdiff_t zv = it->narrowed_zv;
> ptrdiff_t charpos = IT_CHARPOS (*it);
> if (begv <= charpos && charpos <= zv)
> - Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv), Qt);
> + specbind (Qfontification_functions_restriction,
> + Fcons (make_fixnum (begv), make_fixnum (zv)));
> }
Hpw 'bout we do the reverse then: set the narrowing, but let-bind
a variable to indicate that we're inside a line-length-induced
narrowing, together with the previous narrowing bounds, so jit-lock or
its clients can undo the narrowing when needed?
Stefan
This bug report was last modified 2 years and 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.