]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-individual-paragraphs): If JUST-ONE-LINE-PREFIX matches
authorRichard M. Stallman <rms@gnu.org>
Sat, 4 Jul 1998 09:44:09 +0000 (09:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 4 Jul 1998 09:44:09 +0000 (09:44 +0000)
TWO-LINES-PREFIX except with longer whitespace, treat that as a match
even is spaces are replaced with a tab.

lisp/textmodes/fill.el

index 4f0d16ffc6835cf1f5750d0f8eee6fe2c9fcfdc1..abb04746d58d719be664171922ad7f69ec756555 100644 (file)
@@ -1027,7 +1027,8 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
                             ;; use that.
                             (or (let ((adaptive-fill-first-line-regexp "")
                                       just-one-line-prefix
-                                      two-lines-prefix)
+                                      two-lines-prefix
+                                      adjusted-two-lines-prefix)
                                   (setq just-one-line-prefix
                                         (fill-context-prefix
                                          (point)
@@ -1038,10 +1039,17 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
                                          (point)
                                          (save-excursion (forward-line 2)
                                                          (point))))
+                                  (setq adjusted-two-lines-prefix
+                                        (substring two-lines-prefix 0
+                                                   (string-match "[ \t]*\\'"
+                                                                 two-lines-prefix)))
+                                  ;; See if JUST-ONE-LINE-PREFIX
+                                  ;; is the same as TWO-LINES-PREFIX
+                                  ;; except perhaps with longer whitespace.
                                   (if (and just-one-line-prefix
                                            two-lines-prefix
                                            (string-match (concat "\\`"
-                                                                 (regexp-quote two-lines-prefix)
+                                                                 (regexp-quote adjusted-two-lines-prefix)
                                                                  "[ \t]*\\'")
                                                          just-one-line-prefix))
                                       two-lines-prefix
@@ -1080,4 +1088,7 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
            (fill-region-as-paragraph start (point) justify)
            (or had-newline (delete-char -1))))))))
 
+(defun fill-strip-trailing-space (string)
+))
+
 ;;; fill.el ends here