diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-08-18 20:08:38 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-08-18 20:08:38 +0000 |
commit | b4d413d983883184978703a7ce6407ba7513fac7 (patch) | |
tree | 0ae593300ee9396e83ab1f13edb139d8f5a60eb0 /lisp/textmodes | |
parent | ab1c7f352775e81baaa9137e87dca9afef6257f0 (diff) | |
download | emacs-b4d413d983883184978703a7ce6407ba7513fac7.tar.gz |
(fill-individual-paragraphs): Fix handling
of adaptive-fill. Call fill-context-prefix, but bind
adaptive-fill-first-line-regexp to a null string.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/fill.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index a7431356fda..e7fb73f8285 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -951,13 +951,14 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines." (if (not (and fill-prefix (looking-at fill-prefix-regexp))) (setq fill-prefix - (if (and adaptive-fill-mode adaptive-fill-regexp - (looking-at adaptive-fill-regexp)) - (match-string 0) - (buffer-substring - (point) - (save-excursion (skip-chars-forward " \t") - (point)))) + (or (let ((adaptive-fill-first-line-regexp "")) + (fill-context-prefix + (point) + (save-excursion (forward-line 2) (point)))) + (buffer-substring + (point) + (save-excursion (skip-chars-forward " \t") + (point)))) fill-prefix-regexp (regexp-quote fill-prefix))) (forward-line 1) (if (bolp) |