]> git.eshelyaron.com Git - emacs.git/commitdiff
(lisp-fill-paragraph): Don't move back to a line without a comment.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Nov 2001 15:10:42 +0000 (15:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Nov 2001 15:10:42 +0000 (15:10 +0000)
lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el

index ce8cda14bede5478d7620d617844bf56bd7da3b3..f43a72bb15db92d7ad72be5aae27aaf7f5242288 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-20  Stefan Monnier  <monnier@rum.cs.yale.edu>
+
+       * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't move back
+       to a line without a comment.
+
 2001-11-20  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * dired.el (dired-listing-switches): Mention in the doc string
index ceea24168efe476b4a1b31535d867a1398296a3f..38d607d3b25ee065079ec4ce7cc2f2cb8792880d 100644 (file)
@@ -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