Commit 9f7212ad authored by Charles A. Roelli's avatar Charles A. Roelli

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.
parent 0a6c4479
Pipeline #819 failed with stage
in 52 minutes and 43 seconds
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment