diff options
| author | Johan Bockgård | 2008-03-26 11:50:34 +0000 |
|---|---|---|
| committer | Johan Bockgård | 2008-03-26 11:50:34 +0000 |
| commit | 31d24a4b3a67397f53a4a1fb734350d44ae1e589 (patch) | |
| tree | a3389a4bcc610ce93aa182d538b6191dbcf92b35 | |
| parent | 920fb2b0fde98594608cb434be509340bd8b137f (diff) | |
| download | emacs-31d24a4b3a67397f53a4a1fb734350d44ae1e589.tar.gz emacs-31d24a4b3a67397f53a4a1fb734350d44ae1e589.zip | |
(PC-do-completion): Use regexp-quote.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2008-03-26 Johan Bockg$(Q)[(Brd <bojohan@gnu.org> | ||
| 2 | |||
| 3 | * complete.el (PC-do-completion): Use regexp-quote. | ||
| 4 | |||
| 1 | 2008-03-26 Dan Nicolaescu <dann@ics.uci.edu> | 5 | 2008-03-26 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 6 | ||
| 3 | * vc-cvs.el (vc-cvs-parse-status, vc-cvs-after-dir-status): Detect | 7 | * 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." | |||
| 621 | (match-string 2 str) | 621 | (match-string 2 str) |
| 622 | "[A-Za-z0-9]*[^A-Za-z0-9]")) | 622 | "[A-Za-z0-9]*[^A-Za-z0-9]")) |
| 623 | p (1+ (length (match-string 1 str)))))) | 623 | p (1+ (length (match-string 1 str)))))) |
| 624 | (setq regex (concat "\\`" (mapconcat #'list str "[^-]*-")) | 624 | (setq regex (concat "\\`" (mapconcat (lambda (c) |
| 625 | p 1)))) | 625 | (regexp-quote (string c))) |
| 626 | str "[^-]*-")) | ||
| 627 | p 1)))) | ||
| 626 | (when p | 628 | (when p |
| 627 | ;; Use all-completions to do an initial cull. This is a big win, | 629 | ;; Use all-completions to do an initial cull. This is a big win, |
| 628 | ;; since all-completions is written in C! | 630 | ;; since all-completions is written in C! |