]> git.eshelyaron.com Git - emacs.git/commitdiff
; Revert "; * lisp/subr.el (internal--with-narrowing): Simplify"
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Dec 2022 07:49:43 +0000 (09:49 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Dec 2022 07:49:43 +0000 (09:49 +0200)
This reverts commit d9add661617dfba491465943d402230699a9a4ff.

Please install on the release branch only changes that fix
incorrect behavior.  Cleanups don't belong here.

lisp/subr.el

index b21cce16696ce1b1862494100071ebc5570b5062..e142eaa81045ebc509ce162bbcec9ca94be58476 100644 (file)
@@ -3956,9 +3956,10 @@ detailed description.
 (defun internal--with-narrowing (start end body &optional tag)
   "Helper function for `with-narrowing', which see."
   (save-restriction
-    (narrow-to-region start end)
-    (when tag (narrowing-lock tag))
-    (funcall body)))
+    (progn
+      (narrow-to-region start end)
+      (if tag (narrowing-lock tag))
+      (funcall body))))
 
 (defun find-tag-default-bounds ()
   "Determine the boundaries of the default tag, based on text at point.