]> git.eshelyaron.com Git - emacs.git/commit
Improved locked narrowing.
authorGregory Heytings <gregory@heytings.org>
Sat, 20 Aug 2022 16:06:15 +0000 (16:06 +0000)
committerGregory Heytings <gregory@heytings.org>
Sat, 20 Aug 2022 16:08:41 +0000 (18:08 +0200)
commit2727af3fd448e39f79e130c42286e85a51bf7a40
tree38eb7298fda62f15457f8cc0a5d42c53020bd795
parent07c04da01016cd81e064a06b2449892eff7c8da0
Improved locked narrowing.

* src/editfns.c (Fnarrowing_lock, Fnarrowing_unlock,
narrow_to_region_locked, unwind_narrow_to_region_locked):
New functions.
(Fnarrow_to_region, Fwiden): Adapt, and make it possible to use
these functions within the bounds of the locked narrowing.
(syms_of_editfns): Change the name of the variable, make it
buffer-local, and add the two Snarrowing_lock and Snarrowing_unlock
subroutines.

* src/lisp.h: Prototype of 'narrow_to_region_locked'.

* src/xdisp.c (handle_fontified_prop):
* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use
'narrow_to_region_locked'.

* lisp/subr.el (with-locked-narrowing): New macro.
lisp/subr.el
src/editfns.c
src/keyboard.c
src/lisp.h
src/xdisp.c