diff options
| author | Stefan Monnier | 2009-02-19 16:55:24 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-02-19 16:55:24 +0000 |
| commit | f2a8252af4cca4d4f72638408279dec0c5f4251c (patch) | |
| tree | cdba83332f64a246f8a387ee99252a55627dd08d | |
| parent | 7b96ff9a00561c03b017c15837e7aecbb3a34073 (diff) | |
| download | emacs-f2a8252af4cca4d4f72638408279dec0c5f4251c.tar.gz emacs-f2a8252af4cca4d4f72638408279dec0c5f4251c.zip | |
(end-of-defun): Consider the ".*\n" after the end of
the function as being part of the function.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2fc4d1ee310..72672d8efe6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2009-02-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp.el (end-of-defun): Consider the ".*\n" after the end of | ||
| 4 | the function as being part of the function. | ||
| 5 | |||
| 1 | 2009-02-19 Nick Roberts <nickrob@snap.net.nz> | 6 | 2009-02-19 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 7 | ||
| 3 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | 8 | * progmodes/compile.el (compilation-error-regexp-alist-alist): |
| 4 | Move entry for maven (alphabetical order). | 9 | Move entry for maven (alphabetical order). |
| 5 | 10 | ||
| 6 | 2009-02-19 Glenn Morris <rgm@gnu.org> | 11 | 2009-02-19 Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 219f0253ff4..79fb8377f23 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -345,6 +345,14 @@ is called as a function to find the defun's end." | |||
| 345 | (let ((pos (point)) | 345 | (let ((pos (point)) |
| 346 | (beg (progn (end-of-line 1) (beginning-of-defun-raw 1) (point)))) | 346 | (beg (progn (end-of-line 1) (beginning-of-defun-raw 1) (point)))) |
| 347 | (funcall end-of-defun-function) | 347 | (funcall end-of-defun-function) |
| 348 | ;; When comparing point against pos, we want to consider that if | ||
| 349 | ;; point was right after the end of the function, it's still | ||
| 350 | ;; considered as "in that function". | ||
| 351 | ;; E.g. `eval-defun' from right after the last close-paren. | ||
| 352 | (unless (bolp) | ||
| 353 | (skip-chars-forward " \t") | ||
| 354 | (if (looking-at "\\s<\\|\n") | ||
| 355 | (forward-line 1))) | ||
| 348 | (cond | 356 | (cond |
| 349 | ((> arg 0) | 357 | ((> arg 0) |
| 350 | ;; Moving forward. | 358 | ;; Moving forward. |