]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-individual-paragraphs): Don't get
authorKarl Heuer <kwzh@gnu.org>
Sat, 15 Nov 1997 20:58:28 +0000 (20:58 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 15 Nov 1997 20:58:28 +0000 (20:58 +0000)
confused in paragraph loop if we start on the last line
and it has no final newline.

lisp/textmodes/fill.el

index 78e89649ade8d354699f9e3aa52048ed54af3939..d430ad0bc5c26e1966c8e0d74ce316644225a7e0 100644 (file)
@@ -969,11 +969,13 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
              (forward-line 1))))
       (narrow-to-region (point) max)
       ;; Loop over paragraphs.
-      (while (progn
+      (while (let ((here (point)))
               ;; Skip over all paragraph-separating lines
               ;; so as to not include them in any paragraph.
-               (while (progn (move-to-left-margin)
-                            (and (not (eobp)) (looking-at paragraph-separate)))
+               (while (and (not (eobp))
+                          (progn (move-to-left-margin)
+                                 (and (not (eobp))
+                                      (looking-at paragraph-separate))))
                  (forward-line 1))
                (skip-chars-forward " \t\n") (not (eobp)))
        (move-to-left-margin)