emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/fix-locked-narrowing 97314447e6 2/7: Make 'narrowing-lock' and '


From: Gregory Heytings
Subject: scratch/fix-locked-narrowing 97314447e6 2/7: Make 'narrowing-lock' and 'narrowing-unlock' internal
Date: Wed, 8 Feb 2023 20:49:28 -0500 (EST)

branch: scratch/fix-locked-narrowing
commit 97314447e609e673be060bcdf0f244f396a70a3a
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    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.
---
 lisp/subr.el  |  2 +-
 src/editfns.c | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 32c997425c..5cc0c94ba4 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 21e22181b8..e1c5750280 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);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]