From cc7e9720375a3e52a5566351ae8c8f84d096ea72 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 30 Jul 1999 14:34:28 +0000 Subject: [PATCH] (fill-individual-paragraphs): Calculate new fill prefix on each line while looping to the end of paragraph. End paragraph if it's longer than the existing fill prefix. --- lisp/textmodes/fill.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index e79b5588a91..129fd42986a 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1127,6 +1127,13 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." ;; If this line has more or less indent ;; than the fill prefix wants, end the paragraph. (and (looking-at fill-prefix-regexp) + ;; If fill prefix is shorter than a new + ;; fill prefix computed here, end paragraph. + (let ((this-line-fill-prefix + (fill-individual-paragraphs-prefix + citation-regexp))) + (>= (length fill-prefix) + (length this-line-fill-prefix))) (save-excursion (not (progn (forward-char (length fill-prefix)) (or (looking-at "[ \t]") -- 2.39.5