diff options
author | Noam Postavsky <npostavs@gmail.com> | 2020-08-11 16:02:11 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-11 16:02:11 +0200 |
commit | 9b9473ad755da13cb74bf33c99c081f39eec6e08 (patch) | |
tree | c5fdbd7d857c6fc78e98c9b9559697262a68ed5d /lisp/emacs-lisp/lisp.el | |
parent | 2a47ef86e95fad1dcc14a02e7471ba5d9cad4b9b (diff) | |
download | emacs-9b9473ad755da13cb74bf33c99c081f39eec6e08.tar.gz |
Fix (end-of-defun N) for N >= 2
* lisp/emacs-lisp/lisp.el (end-of-defun): Only skip to next line when
after end of defun when ARG is 1 or less.
* test/lisp/emacs-lisp/lisp-tests.el (end-of-defun-twice): New
test (bug#24427).
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 043cf01d2e9..8c18557c79a 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -482,7 +482,8 @@ is called as a function to find the defun's end." (if (looking-at "\\s<\\|\n") (forward-line 1)))))) (funcall end-of-defun-function) - (funcall skip) + (when (<= arg 1) + (funcall skip)) (cond ((> arg 0) ;; Moving forward. |