# HG changeset patch # User Stefan Monnier # Date 1234412174 0 # Node ID 6ad8cdf501c1cd11b25e8eff046e7cb600da6064 # Parent 0273f3af7765188e5a1d0d11e0799cb3b3b9553b (end-of-defun): Don't skip to next line after calling end-of-defun-function if it already moved to BOL. diff -r 0273f3af7765 -r 6ad8cdf501c1 lisp/ChangeLog --- a/lisp/ChangeLog Thu Feb 12 04:01:11 2009 +0000 +++ b/lisp/ChangeLog Thu Feb 12 04:16:14 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-12 Stefan Monnier + + * emacs-lisp/lisp.el (end-of-defun): Don't skip to next line after + calling end-of-defun-function if it already moved to BOL. + 2009-02-12 Richard M Stallman * mail/rmail.el (rmail-show-message-verbose-min): New option. @@ -106,8 +111,7 @@ 2009-02-09 Ulf Jasper * net/newst-treeview.el (newsticker-treeview-save) - (newsticker--treeview-load): Kill groups buffer after - saving/loading. + (newsticker--treeview-load): Kill groups buffer after saving/loading. 2009-02-09 Tassilo Horn diff -r 0273f3af7765 -r 6ad8cdf501c1 lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Thu Feb 12 04:01:11 2009 +0000 +++ b/lisp/emacs-lisp/lisp.el Thu Feb 12 04:16:14 2009 +0000 @@ -348,9 +348,10 @@ (beginning-of-defun-raw 1) (while (unless (eobp) (funcall end-of-defun-function) - (skip-chars-forward " \t") - (if (looking-at "\\s<\\|\n") - (forward-line 1)) + (unless (bolp) + (skip-chars-forward " \t") + (if (looking-at "\\s<\\|\n") + (forward-line 1))) ;; If we started after the end of the previous ;; function, try again with the next one. (unless (or (> (point) pos) @@ -370,9 +371,10 @@ (let ((beg (point)) retry-point) (funcall end-of-defun-function) - (skip-chars-forward " \t") - (if (looking-at "\\s<\\|\n") - (forward-line 1)) + (unless (bolp) + (skip-chars-forward " \t") + (if (looking-at "\\s<\\|\n") + (forward-line 1))) ;; If we started from within the function just found, ;; try again with the previous one. (unless (or (< (point) pos)