From: Karl Heuer Date: Sat, 15 Nov 1997 20:58:28 +0000 (+0000) Subject: (fill-individual-paragraphs): Don't get X-Git-Tag: emacs-20.3~2810 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=183e4bd6f1410210a6e69d8fda12bd0f4eabd212;p=emacs.git (fill-individual-paragraphs): Don't get confused in paragraph loop if we start on the last line and it has no final newline. --- diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 78e89649ade..d430ad0bc5c 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -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)