Mercurial > emacs
comparison lisp/complete.el @ 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 | 107ccd98fa12 |
children | 4dfdf555a78e |
comparison
equal
deleted
inserted
replaced
93242:0dcb59446144 | 93243:9ecf89702ffc |
---|---|
619 (setq regex (concat "\\`" | 619 (setq regex (concat "\\`" |
620 (mapconcat #'list | 620 (mapconcat #'list |
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! |
629 (let ((compl (all-completions (if env-on | 631 (let ((compl (all-completions (if env-on |
630 (file-name-nondirectory (substring str 0 p)) | 632 (file-name-nondirectory (substring str 0 p)) |