summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2023-02-13 10:23:39 +0000
committerGregory Heytings <gregory@heytings.org>2023-02-13 11:39:46 +0100
commitdcb2379a463678bdadd05ee39d61e7da84c71c5e (patch)
tree551ac04d89f0a0b6c18ef5d4967d40c4e2dc5afb /lisp/subr.el
parent4297039bd1325166eac82d950951716ec122d465 (diff)
downloademacs-dcb2379a463678bdadd05ee39d61e7da84c71c5e.tar.gz
Minor improvements to labeled narrowing
* lisp/subr.el (internal--with-narrowing): (internal--without-narrowing): Remove unnecessary 'progn'. * etc/NEWS: Mention 'with-narrowing' in the entry about long lines. * doc/lispref/positions.texi (Narrowing): Fix typo. * doc/lispref/display.texi (Auto Faces): Use @pxref. * doc/lispref/commands.texi (Command Overview): Use @pxref.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 7ed0cb02a70..d280c7fef13 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3961,10 +3961,9 @@ same LABEL argument.
(defun internal--with-narrowing (start end body &optional label)
"Helper function for `with-narrowing', which see."
(save-restriction
- (progn
- (narrow-to-region start end)
- (if label (internal--lock-narrowing label))
- (funcall body))))
+ (narrow-to-region start end)
+ (if label (internal--lock-narrowing label))
+ (funcall body)))
(defmacro without-narrowing (&rest rest)
"Execute BODY without restrictions.
@@ -3984,10 +3983,9 @@ are lifted.
(defun internal--without-narrowing (body &optional label)
"Helper function for `without-narrowing', which see."
(save-restriction
- (progn
- (if label (internal--unlock-narrowing label))
- (widen)
- (funcall body))))
+ (if label (internal--unlock-narrowing label))
+ (widen)
+ (funcall body)))
(defun find-tag-default-bounds ()
"Determine the boundaries of the default tag, based on text at point.