]> git.eshelyaron.com Git - emacs.git/commit
Improve font locking in buffers with long lines (bug#56682).
authorGregory Heytings <gregory@heytings.org>
Fri, 22 Jul 2022 10:03:13 +0000 (10:03 +0000)
committerGregory Heytings <gregory@heytings.org>
Fri, 22 Jul 2022 10:06:31 +0000 (12:06 +0200)
commit874e2525035d45efa6fa374a2ebec3740ecc1457
tree059221aee889a88f558802014c5680017eaec1d0
parent616da8fa8efa9023f56fa731072d877e2150afbc
Improve font locking in buffers with long lines (bug#56682).

* src/dispextern.h (struct it): New 'narrowed_zv' field.

* src/xdisp.c (init_iterator): Set the field.
(get_narrowed_zv): New function to set the field.
(handle_fontified_prop): Use the field, together with 'narrowed_begv',
to narrow the portion of the buffer that 'Vfontification_functions'
will see.  Also bind 'inhibit-widen'.
(get_narrowed_len): New function, factored out of 'get_narrowed_begv'.
(unwind_narrowed_zv): New function.

* src/editfns.c (syms_of_editfns): New variable and symbol 'inhibit-widen'.
(Fwiden): Do nothing when 'inhibit-widen' is non-nil.
src/dispextern.h
src/editfns.c
src/xdisp.c