]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-individual-paragraphs): Fix handling
authorRichard M. Stallman <rms@gnu.org>
Mon, 18 Aug 1997 20:08:38 +0000 (20:08 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 18 Aug 1997 20:08:38 +0000 (20:08 +0000)
of adaptive-fill.  Call fill-context-prefix, but bind
adaptive-fill-first-line-regexp to a null string.

lisp/textmodes/fill.el

index a7431356fda8ee77ae1ea6cced3c9bcfb4a1596f..e7fb73f8285a8436fddf80aa4830596c1354354e 100644 (file)
@@ -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)