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:
parent
0a6c4479cf
commit
9f7212ad42
1 changed files with 1 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue