]> code.delx.au - gnu-emacs/commitdiff
(fill-individual-paragraphs): Don't get stuck
authorRichard M. Stallman <rms@gnu.org>
Fri, 31 May 1996 04:17:02 +0000 (04:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 31 May 1996 04:17:02 +0000 (04:17 +0000)
if no newline at the end of the region.

lisp/textmodes/fill.el

index 1ce82773f786a88d9d7c2856c851f986741ca740..fd6db93ccd40b6ad045641d30b04a33efcd7b3c5 100644 (file)
@@ -828,7 +828,10 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
                                                (point))))
                             fill-prefix-regexp (regexp-quote fill-prefix)))
                   (forward-line 1)
-                  (move-to-left-margin)
+                  (if (bolp)
+                      ;; If forward-line went past a newline,
+                      ;; move further to the left margin.
+                      (move-to-left-margin))
                   ;; Now stop the loop if end of paragraph.
                   (and (not (eobp))
                        (if fill-individual-varying-indent