From: Richard M. Stallman Date: Mon, 18 Aug 1997 20:08:38 +0000 (+0000) Subject: (fill-individual-paragraphs): Fix handling X-Git-Tag: emacs-20.1~529 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b4d413d983883184978703a7ce6407ba7513fac7;p=emacs.git (fill-individual-paragraphs): Fix handling of adaptive-fill. Call fill-context-prefix, but bind adaptive-fill-first-line-regexp to a null string. --- 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)