Simplify easy-mmode-define-navigation

* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
Simplify a one-argument call to "or" and use buffer-narrowed-p instead
of checking that condition by hand.
This commit is contained in:
Charles A. Roelli 2019-02-19 19:54:44 +01:00
parent 0a6c4479cf
commit 9f7212ad42

View file

@ -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))