# HG changeset patch # User Stefan Monnier # Date 993496798 0 # Node ID b75d5ec491a584b29404fea977f282f364af764f # Parent d483b73544a0c6850ee03bea9b5468ea51162f19 (fill-region-as-paragraph): Don't look further back than LINEBEG. diff -r d483b73544a0 -r b75d5ec491a5 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Mon Jun 25 15:38:01 2001 +0000 +++ b/lisp/textmodes/fill.el Mon Jun 25 19:19:58 2001 +0000 @@ -527,15 +527,16 @@ ;; further fills will assume it ends a sentence. ;; If we now know it does not end a sentence, ;; avoid putting it at the end of the line. - (while (or (and sentence-end-double-space - (> (point) (+ linebeg 2)) - (eq (preceding-char) ?\ ) - (not (eq (following-char) ?\ )) - (eq (char-after (- (point) 2)) ?\.) - (progn (forward-char -2) t)) - (and fill-nobreak-predicate - (funcall fill-nobreak-predicate) - (skip-chars-backward " \t"))) + (while (and (> (point) linebeg) + (or (and sentence-end-double-space + (> (point) (+ linebeg 2)) + (eq (preceding-char) ?\ ) + (not (eq (following-char) ?\ )) + (eq (char-after (- (point) 2)) ?\.) + (progn (forward-char -2) t)) + (and fill-nobreak-predicate + (funcall fill-nobreak-predicate) + (skip-chars-backward " \t")))) (if (re-search-backward " \\|\\c|.\\|.\\c|" linebeg 0) (forward-char 1))) ;; If the left margin and fill prefix by themselves