summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2023-02-09 01:09:10 +0000
committerGregory Heytings <gregory@heytings.org>2023-02-09 02:44:36 +0100
commit97314447e609e673be060bcdf0f244f396a70a3a (patch)
tree9b2a568a401d2b17f9483f4c2b24c31f48bf7dc0
parenta4aa32bdfff7aaf54efbacbb04b7f2b52fef92a7 (diff)
downloademacs-97314447e609e673be060bcdf0f244f396a70a3a.tar.gz
Make 'narrowing-lock' and 'narrowing-unlock' internal
* src/editfns.c (Finternal__lock_narrowing): Renamed from 'narrowing-lock'. (Finternal__unlock_narrowing): Renamed from 'narrowing-unlock'. (unwind_narrow_to_region_locked): (narrow_to_region_locked): (syms_of_editfns): Use the new names. * lisp/subr.el (internal--with-narrowing): Use the new name.
-rw-r--r--lisp/subr.el2
-rw-r--r--src/editfns.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 32c997425cf..5cc0c94ba48 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3963,7 +3963,7 @@ detailed description.
(save-restriction
(progn
(narrow-to-region start end)
- (if tag (narrowing-lock tag))
+ (if tag (internal--lock-narrowing tag))
(funcall body))))
(defun find-tag-default-bounds ()
diff --git a/src/editfns.c b/src/editfns.c
index 21e22181b82..e1c57502805 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2812,7 +2812,7 @@ narrowing_locks_restore (Lisp_Object buf_and_saved_locks)
static void
unwind_narrow_to_region_locked (Lisp_Object tag)
{
- Fnarrowing_unlock (tag);
+ Finternal__unlock_narrowing (tag);
Fwiden ();
}
@@ -2821,7 +2821,7 @@ void
narrow_to_region_locked (Lisp_Object begv, Lisp_Object zv, Lisp_Object tag)
{
Fnarrow_to_region (begv, zv);
- Fnarrowing_lock (tag);
+ Finternal__lock_narrowing (tag);
record_unwind_protect (restore_point_unwind, Fpoint_marker ());
record_unwind_protect (unwind_narrow_to_region_locked, tag);
}
@@ -2932,7 +2932,8 @@ limit of the locked restriction is used instead of the argument. */)
return Qnil;
}
-DEFUN ("narrowing-lock", Fnarrowing_lock, Snarrowing_lock, 1, 1, 0,
+DEFUN ("internal--lock-narrowing", Finternal__lock_narrowing,
+ Sinternal__lock_narrowing, 1, 1, 0,
doc: /* Lock the current narrowing with TAG.
When restrictions are locked, `narrow-to-region' and `widen' can be
@@ -2967,7 +2968,8 @@ not be used as a stronger variant of normal restrictions. */)
return Qnil;
}
-DEFUN ("narrowing-unlock", Fnarrowing_unlock, Snarrowing_unlock, 1, 1, 0,
+DEFUN ("internal--unlock-narrowing", Finternal__unlock_narrowing,
+ Sinternal__unlock_narrowing, 1, 1, 0,
doc: /* Unlock a narrowing locked with (narrowing-lock TAG).
Unlocking restrictions locked with `narrowing-lock' should be used
@@ -4903,8 +4905,8 @@ it to be non-nil. */);
defsubr (&Sdelete_and_extract_region);
defsubr (&Swiden);
defsubr (&Snarrow_to_region);
- defsubr (&Snarrowing_lock);
- defsubr (&Snarrowing_unlock);
+ defsubr (&Sinternal__lock_narrowing);
+ defsubr (&Sinternal__unlock_narrowing);
defsubr (&Ssave_restriction);
defsubr (&Stranspose_regions);
}