summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2019-02-20 16:58:57 +0100
committerTassilo Horn <tsdh@gnu.org>2019-02-20 16:58:57 +0100
commite5c99a1757c281953257ac2548fb77702af75c86 (patch)
tree4820116244ad6650f53208bc792ca248ccc630fb /lisp/emacs-lisp/easy-mmode.el
parentbfa10b704ebe71c91d5e5eb28e407a02d2d88863 (diff)
parentae77728d14e58054bdaee3c6965979947c778208 (diff)
downloademacs-scratch/replace-region-contents.tar.gz
Merge branch 'master' into scratch/replace-region-contentsscratch/replace-region-contents
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 07a594fdb56..0cb9a6fa122 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -624,9 +624,7 @@ BODY is executed after moving to the destination location."
(when-narrowed
(lambda (body)
(if (null narrowfun) body
- `(let ((was-narrowed
- (prog1 (or (< (- (point-max) (point-min)) (buffer-size)))
- (widen))))
+ `(let ((was-narrowed (prog1 (buffer-narrowed-p) (widen))))
,body
(when was-narrowed (funcall #',narrowfun)))))))
(unless name (setq name base-name))