# HG changeset patch # User Johan Bockgrd # Date 1206532234 0 # Node ID 9ecf89702ffc652ac0a761ba558c014bd835ae72 # Parent 0dcb5944614443837f254b481db7e4485e7a55d8 (PC-do-completion): Use regexp-quote. diff -r 0dcb59446144 -r 9ecf89702ffc lisp/ChangeLog --- 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 + + * complete.el (PC-do-completion): Use regexp-quote. + 2008-03-26 Dan Nicolaescu * vc-cvs.el (vc-cvs-parse-status, vc-cvs-after-dir-status): Detect diff -r 0dcb59446144 -r 9ecf89702ffc lisp/complete.el --- 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!