changeset 41310:ab1a42ecf560

(lisp-fill-paragraph): Don't move back to a line without a comment.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 20 Nov 2001 15:10:25 +0000
parents 8c4c4027c7bd
children 73c084009e57
files lisp/emacs-lisp/lisp-mode.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el	Tue Nov 20 14:20:41 2001 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Tue Nov 20 15:10:25 2001 +0000
@@ -1082,8 +1082,11 @@
 	  (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