From 31d24a4b3a67397f53a4a1fb734350d44ae1e589 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johan=20Bockg=C3=A5rd?= Date: Wed, 26 Mar 2008 11:50:34 +0000 Subject: [PATCH] (PC-do-completion): Use regexp-quote. --- lisp/ChangeLog | 4 ++++ lisp/complete.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb8f3cdd4ef..f0dd5ed82f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/complete.el b/lisp/complete.el index cbc678de977..da75ed2dbe1 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -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! -- 2.11.4.GIT