diff options
| author | Karl Heuer | 1997-11-15 20:58:28 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-11-15 20:58:28 +0000 |
| commit | 183e4bd6f1410210a6e69d8fda12bd0f4eabd212 (patch) | |
| tree | 7ee0d693cc851c986874607fc664db9be294abeb | |
| parent | 6321bdddfbe9e7152e48f34c2aa5e151eeb06c91 (diff) | |
| download | emacs-183e4bd6f1410210a6e69d8fda12bd0f4eabd212.tar.gz emacs-183e4bd6f1410210a6e69d8fda12bd0f4eabd212.zip | |
(fill-individual-paragraphs): Don't get
confused in paragraph loop if we start on the last line
and it has no final newline.
| -rw-r--r-- | lisp/textmodes/fill.el | 8 |
1 files changed, 5 insertions, 3 deletions
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." | |||
| 969 | (forward-line 1)))) | 969 | (forward-line 1)))) |
| 970 | (narrow-to-region (point) max) | 970 | (narrow-to-region (point) max) |
| 971 | ;; Loop over paragraphs. | 971 | ;; Loop over paragraphs. |
| 972 | (while (progn | 972 | (while (let ((here (point))) |
| 973 | ;; Skip over all paragraph-separating lines | 973 | ;; Skip over all paragraph-separating lines |
| 974 | ;; so as to not include them in any paragraph. | 974 | ;; so as to not include them in any paragraph. |
| 975 | (while (progn (move-to-left-margin) | 975 | (while (and (not (eobp)) |
| 976 | (and (not (eobp)) (looking-at paragraph-separate))) | 976 | (progn (move-to-left-margin) |
| 977 | (and (not (eobp)) | ||
| 978 | (looking-at paragraph-separate)))) | ||
| 977 | (forward-line 1)) | 979 | (forward-line 1)) |
| 978 | (skip-chars-forward " \t\n") (not (eobp))) | 980 | (skip-chars-forward " \t\n") (not (eobp))) |
| 979 | (move-to-left-margin) | 981 | (move-to-left-margin) |