diff options
author | Gregory Heytings <gregory@heytings.org> | 2022-11-26 14:09:41 +0000 |
---|---|---|
committer | Gregory Heytings <gregory@heytings.org> | 2022-11-26 15:10:17 +0100 |
commit | 558084c7f736bebcb3cffc2bf4f617158d92357f (patch) | |
tree | 5e05c5a457fe09073321b6b6543f1bbc00e766ed /src/keyboard.c | |
parent | 16b8b0d1e07d394e01f76d9eed6006219b4d745b (diff) | |
download | emacs-558084c7f736bebcb3cffc2bf4f617158d92357f.tar.gz |
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.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 4b35a044eb0..cb308f5bfc1 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1911,8 +1911,8 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w) specbind (Qinhibit_quit, Qt); if (current_buffer->long_line_optimizations_p) - narrow_to_region_locked (make_fixnum (get_narrowed_begv (w, PT)), - make_fixnum (get_narrowed_zv (w, PT)), + narrow_to_region_locked (make_fixnum (get_locked_narrowing_begv (PT)), + make_fixnum (get_locked_narrowing_zv (PT)), hook); run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), |