]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/subr.el (internal--with-narrowing): Simplify
authorPhilip Kaludercic <philipk@posteo.net>
Fri, 16 Dec 2022 23:11:46 +0000 (00:11 +0100)
committerPhilip Kaludercic <philipk@posteo.net>
Fri, 16 Dec 2022 23:41:14 +0000 (00:41 +0100)
(Bug#60130)

lisp/subr.el

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