changeset 44507:d62ce2e3b473

(fill-context-prefix): Fix up last change.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 12 Apr 2002 00:01:53 +0000
parents 4b6af4218eb9
children 235f5029534d
files lisp/textmodes/fill.el
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Thu Apr 11 23:49:56 2002 +0000
+++ b/lisp/textmodes/fill.el	Fri Apr 12 00:01:53 2002 +0000
@@ -244,14 +244,16 @@
 		;; 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,