aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/textmodes/fill.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 8f840d7624c..5a39ba4d8b1 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -244,14 +244,16 @@ act as a paragraph-separator."
244 ;; just use it (this subsumes the 2 checks used previously). 244 ;; just use it (this subsumes the 2 checks used previously).
245 ;; Used when first line is `/* ...' and second-line is 245 ;; Used when first line is `/* ...' and second-line is
246 ;; ` * ...'. 246 ;; ` * ...'.
247 (string-match 247 (let ((flp (replace-regexp-in-string
248 (concat "\\`" 248 "[ \t]+" "" first-line-prefix)))
249 (mapconcat 249 (if (equal flp "")
250 (lambda (c) (regexp-quote (string c))) 250 (string-match "\\`[ \t]*\\'" second-line-prefix)
251 (replace-regexp-in-string "[ \t]+" "" first-line-prefix) 251 (string-match
252 "?") 252 (concat "\\`"
253 "?\\'") 253 (mapconcat
254 (replace-regexp-in-string "[ \t]+" "" second-line-prefix)) 254 (lambda (c) (regexp-quote (string c))) flp "?")
255 "?\\'")
256 (replace-regexp-in-string "[ \t]+" "" second-line-prefix))))
255 second-line-prefix 257 second-line-prefix
256 258
257 ;; Use the longest common substring of both prefixes, 259 ;; Use the longest common substring of both prefixes,