Commit 183e4bd6 authored by Karl Heuer's avatar Karl Heuer
Browse files

(fill-individual-paragraphs): Don't get

confused in paragraph loop if we start on the last line
and it has no final newline.
parent 6321bddd
...@@ -969,11 +969,13 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines." ...@@ -969,11 +969,13 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
(forward-line 1)))) (forward-line 1))))
(narrow-to-region (point) max) (narrow-to-region (point) max)
;; Loop over paragraphs. ;; Loop over paragraphs.
(while (progn (while (let ((here (point)))
;; Skip over all paragraph-separating lines ;; Skip over all paragraph-separating lines
;; so as to not include them in any paragraph. ;; so as to not include them in any paragraph.
(while (progn (move-to-left-margin) (while (and (not (eobp))
(and (not (eobp)) (looking-at paragraph-separate))) (progn (move-to-left-margin)
(and (not (eobp))
(looking-at paragraph-separate))))
(forward-line 1)) (forward-line 1))
(skip-chars-forward " \t\n") (not (eobp))) (skip-chars-forward " \t\n") (not (eobp)))
(move-to-left-margin) (move-to-left-margin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment