diff options
author | Tassilo Horn <tsdh@gnu.org> | 2019-02-20 16:58:57 +0100 |
---|---|---|
committer | Tassilo Horn <tsdh@gnu.org> | 2019-02-20 16:58:57 +0100 |
commit | e5c99a1757c281953257ac2548fb77702af75c86 (patch) | |
tree | 4820116244ad6650f53208bc792ca248ccc630fb /lisp/emacs-lisp/easy-mmode.el | |
parent | bfa10b704ebe71c91d5e5eb28e407a02d2d88863 (diff) | |
parent | ae77728d14e58054bdaee3c6965979947c778208 (diff) | |
download | emacs-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.el | 4 |
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)) |