Mercurial > emacs
changeset 13587:a0c1c62e2c4a
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 18 Nov 1995 16:46:53 +0000 |
parents | 292e11b5f9c6 |
children | c50d9d86eda9 |
files | lisp/simple.el |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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.