# HG changeset patch # User Stefan Monnier # Date 1033998884 0 # Node ID d53b71650f3b8371bc48f034fb4cb0583c8e86ed # Parent af8ff2a92902d40c4a66965a62a0797063e521ed (fill-paragraph): Go to BOL before calling forward-paragraph to make sure its return value is meaningful. diff -r af8ff2a92902 -r d53b71650f3b lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Mon Oct 07 04:00:07 2002 +0000 +++ b/lisp/textmodes/fill.el Mon Oct 07 13:54:44 2002 +0000 @@ -697,6 +697,12 @@ ;; Fill prefix used for filling the paragraph. fill-pfx) (save-excursion + ;; To make sure the return value of forward-paragraph is meaningful, + ;; we have to start from the beginning of line, otherwise skipping + ;; past the last few chars of a paragraph-separator would count as + ;; a paragraph (and not skipping any chars at EOB would not count + ;; as a paragraph even if it is). + (move-to-left-margin) (if (not (zerop (forward-paragraph))) ;; There's no paragraph at or after point: give up. (setq fill-pfx "")