aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-04-12 00:01:53 +0000
committerStefan Monnier2002-04-12 00:01:53 +0000
commit4599773d96f8d587d2026ebb96865105e16743fc (patch)
tree345ec199b458502c00e3b2d3d3bb8af84e97abd7
parent9f4e3c269a923820bbdadaf2cc825bac4b295bd8 (diff)
downloademacs-4599773d96f8d587d2026ebb96865105e16743fc.tar.gz
emacs-4599773d96f8d587d2026ebb96865105e16743fc.zip
(fill-context-prefix): Fix up last change.
-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,