# HG changeset patch # User Stefan Monnier # Date 1018569713 0 # Node ID d62ce2e3b4737f19e9f491b3d993612a8e5d3919 # Parent 4b6af4218eb9b5e9bb6177c878486a422d9a6894 (fill-context-prefix): Fix up last change. diff -r 4b6af4218eb9 -r d62ce2e3b473 lisp/textmodes/fill.el --- 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,