]> git.eshelyaron.com Git - emacs.git/commit
Improve locked narrowing around low-level hooks.
authorGregory Heytings <gregory@heytings.org>
Sat, 26 Nov 2022 14:09:41 +0000 (14:09 +0000)
committerGregory Heytings <gregory@heytings.org>
Sat, 26 Nov 2022 14:10:17 +0000 (15:10 +0100)
commit558084c7f736bebcb3cffc2bf4f617158d92357f
tree5e05c5a457fe09073321b6b6543f1bbc00e766ed
parent16b8b0d1e07d394e01f76d9eed6006219b4d745b
Improve locked narrowing around low-level hooks.

* src/buffer.c (syms_of_buffer): Two new variables,
'long-line-locked-narrowing-region-size' and
'long-line-locked-narrowing-bol-search-limit', to make the locked
narrowing around low-level hooks configurable.

Increase the default value of 'long-line-threshold'.  After
carefully considering the (few) bug reports about long line
optimizations, I concluded that the previous default value was too
low.

* src/xdisp.c (get_locked_narrowing_begv)
(get_locked_narrowing_zv): Two new functions.
(handle_fontified_prop, reseat): Use them.

* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use them.

* src/dispextern.h (struct it): Add two new fields to store the
values returned by these functions.
Make them externally visible.

* src/editfns.c: (Fsave_restriction): Update docstring.
src/buffer.c
src/dispextern.h
src/editfns.c
src/keyboard.c
src/xdisp.c