*** empty log message ***
[bpt/emacs.git] / lisp / complete.el
index cbc678d..0050ecf 100644 (file)
@@ -621,8 +621,10 @@ GOTO-END is non-nil, however, it instead replaces up to END."
                                                    (match-string 2 str)
                                                    "[A-Za-z0-9]*[^A-Za-z0-9]"))
                           p (1+ (length (match-string 1 str))))))
-                (setq regex (concat "\\`" (mapconcat #'list str "[^-]*-"))
-                      p 1))))
+             (setq regex (concat "\\`" (mapconcat (lambda (c)
+                                                    (regexp-quote (string c)))
+                                                  str "[^-]*-"))
+                   p 1))))
         (when p
        ;; Use all-completions to do an initial cull.  This is a big win,
        ;; since all-completions is written in C!
@@ -1105,11 +1107,11 @@ This is only used by "
                         (format (if (string-match "/\\'" x) "<%s" "<%s>") x))
                      (PC-include-file-all-completions
                       name (PC-include-file-path)))))
-              (cond
-               ((not completion-table) nil)
-               ((eq action 'lambda) (test-completion str2 completion-table nil))
-               ((eq action nil) (PC-try-completion str2 completion-table nil))
-          ((eq action t) (all-completions str2 completion-table nil))))
+        (cond
+         ((not completion-table) nil)
+         ((eq action 'lambda) (test-completion str2 completion-table nil))
+         ((eq action nil) (PC-try-completion str2 completion-table nil))
+         ((eq action t) (all-completions str2 completion-table nil))))
     (read-file-name-internal string dir action)))
 \f