# HG changeset patch # User Stefan Monnier # Date 1235062524 0 # Node ID 4eb463737ac816478a16df4fa87e7649d520a9ba # Parent f37df1494dcd913829d9d6b09f449ad82e395fc7 (end-of-defun): Consider the ".*\n" after the end of the function as being part of the function. diff -r f37df1494dcd -r 4eb463737ac8 lisp/ChangeLog --- a/lisp/ChangeLog Thu Feb 19 15:10:20 2009 +0000 +++ b/lisp/ChangeLog Thu Feb 19 16:55:24 2009 +0000 @@ -1,6 +1,11 @@ +2009-02-19 Stefan Monnier + + * emacs-lisp/lisp.el (end-of-defun): Consider the ".*\n" after the end of + the function as being part of the function. + 2009-02-19 Nick Roberts - * progmodes/compile.el (compilation-error-regexp-alist-alist): + * progmodes/compile.el (compilation-error-regexp-alist-alist): Move entry for maven (alphabetical order). 2009-02-19 Glenn Morris diff -r f37df1494dcd -r 4eb463737ac8 lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Thu Feb 19 15:10:20 2009 +0000 +++ b/lisp/emacs-lisp/lisp.el Thu Feb 19 16:55:24 2009 +0000 @@ -345,6 +345,14 @@ (let ((pos (point)) (beg (progn (end-of-line 1) (beginning-of-defun-raw 1) (point)))) (funcall end-of-defun-function) + ;; When comparing point against pos, we want to consider that if + ;; point was right after the end of the function, it's still + ;; considered as "in that function". + ;; E.g. `eval-defun' from right after the last close-paren. + (unless (bolp) + (skip-chars-forward " \t") + (if (looking-at "\\s<\\|\n") + (forward-line 1))) (cond ((> arg 0) ;; Moving forward.