[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 83d9fa6a28 2/2: ; * lisp/subr.el (internal--with-narrowing): Simp
From: |
Philip Kaludercic |
Subject: |
master 83d9fa6a28 2/2: ; * lisp/subr.el (internal--with-narrowing): Simplify |
Date: |
Sat, 17 Dec 2022 06:19:20 -0500 (EST) |
branch: master
commit 83d9fa6a2862e3d1da49414db150448e7ee5e899
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
; * lisp/subr.el (internal--with-narrowing): Simplify
(Bug#60130)
---
lisp/subr.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index e142eaa810..b21cce1669 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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.