changeset 93243:9ecf89702ffc

(PC-do-completion): Use regexp-quote.
author Johan Bockgård <bojohan@gnu.org>
date Wed, 26 Mar 2008 11:50:34 +0000
parents 0dcb59446144
children 790aba3b39c5
files lisp/ChangeLog lisp/complete.el
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 26 07:15:05 2008 +0000
+++ b/lisp/ChangeLog	Wed Mar 26 11:50:34 2008 +0000
@@ -1,3 +1,7 @@
+2008-03-26  Johan Bockg$(Q)[(Brd  <bojohan@gnu.org>
+
+	* complete.el (PC-do-completion): Use regexp-quote.
+
 2008-03-26  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc-cvs.el (vc-cvs-parse-status, vc-cvs-after-dir-status): Detect
--- a/lisp/complete.el	Wed Mar 26 07:15:05 2008 +0000
+++ b/lisp/complete.el	Wed Mar 26 11:50:34 2008 +0000
@@ -621,8 +621,10 @@
                                                    (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!