]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-context-prefix): Fix up last change.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 00:01:53 +0000 (00:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 00:01:53 +0000 (00:01 +0000)
lisp/textmodes/fill.el

index 8f840d7624cfc94bec0ecc04fa5720b8792a2e28..5a39ba4d8b11c27b6e780b7883154aa37af0f3be 100644 (file)
@@ -244,14 +244,16 @@ act as a paragraph-separator."
                ;; just use it (this subsumes the 2 checks used previously).
                ;; Used when first line is `/* ...' and second-line is
                ;; ` * ...'.
-               (string-match
-                (concat "\\`"
-                        (mapconcat
-                         (lambda (c) (regexp-quote (string c)))
-                         (replace-regexp-in-string "[ \t]+" "" first-line-prefix)
-                         "?")
-                        "?\\'")
-                (replace-regexp-in-string "[ \t]+" "" second-line-prefix))
+               (let ((flp (replace-regexp-in-string
+                           "[ \t]+" "" first-line-prefix)))
+                 (if (equal flp "")
+                     (string-match "\\`[ \t]*\\'" second-line-prefix)
+                   (string-match
+                    (concat "\\`"
+                            (mapconcat
+                             (lambda (c) (regexp-quote (string c))) flp "?")
+                            "?\\'")
+                    (replace-regexp-in-string "[ \t]+" "" second-line-prefix))))
                second-line-prefix
 
              ;; Use the longest common substring of both prefixes,