# HG changeset patch # User Richard M. Stallman # Date 816713213 0 # Node ID a0c1c62e2c4af70215eb5ac6bdd1d850cb163e8b # Parent 292e11b5f9c6ef628f952336a963df95c767331a (do-auto-fill): Look at 2nd line for fill prefix even when on the first line. Don't accept non-whitespace prefix from the first line. (do-auto-fill): Ignore the result of fill-context-prefix if it is empty. diff -r 292e11b5f9c6 -r a0c1c62e2c4a lisp/simple.el --- a/lisp/simple.el Sat Nov 18 16:42:57 1995 +0000 +++ b/lisp/simple.el Sat Nov 18 16:46:53 1995 +0000 @@ -2331,10 +2331,15 @@ ;; Choose a fill-prefix automatically. (if (and adaptive-fill-mode (or (null fill-prefix) (string= fill-prefix ""))) - (setq fill-prefix - (fill-context-prefix - (save-excursion (backward-paragraph 1) (point)) - (point)))) + (let ((prefix + (fill-context-prefix + (save-excursion (backward-paragraph 1) (point)) + (save-excursion (forward-paragraph 1) (point)) + ;; Don't accept a non-whitespace fill prefix + ;; from the first line of a paragraph. + "^[ \t]*$"))) + (and prefix (not (equal prefix "")) + (setq fill-prefix prefix)))) (while (and (not give-up) (> (current-column) fc)) ;; Determine where to split the line.