From: Stefan Monnier Date: Tue, 20 Nov 2001 15:10:42 +0000 (+0000) Subject: (lisp-fill-paragraph): Don't move back to a line without a comment. X-Git-Tag: ttn-vms-21-2-B4~18342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed3c639167e8f4fbe193c5d912331bd15a565c3a;p=emacs.git (lisp-fill-paragraph): Don't move back to a line without a comment. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce8cda14bed..f43a72bb15d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-20 Stefan Monnier + + * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't move back + to a line without a comment. + 2001-11-20 Eli Zaretskii * dired.el (dired-listing-switches): Mention in the doc string diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index ceea24168ef..38d607d3b25 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1082,8 +1082,11 @@ and initial semicolons." (narrow-to-region ;; Find the first line we should include in the region to fill. (save-excursion - (while (and (looking-at "[ \t]*;") - (zerop (forward-line -1)))) + (while (and (zerop (forward-line -1)) + (looking-at "[ \t]*;"))) + ;; We may have gone too far. Go forward again. + (or (looking-at ".*;") + (forward-line 1)) (point)) ;; Find the beginning of the first line past the region to fill. (save-excursion