confused in paragraph loop if we start on the last line
and it has no final newline.
(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)