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).
This commit is contained in:
parent
2a47ef86e9
commit
9b9473ad75
2 changed files with 57 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue