* lisp/shell.el (shell-completion-vars): Set pcomplete-arg-quote-list.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Aug 2011 05:25:17 +0000 (01:25 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Aug 2011 05:25:17 +0000 (01:25 -0400)
* lisp/pcomplete.el (pcomplete-quote-argument): Fix thinko.

Fixes: debbugs:9161

lisp/ChangeLog
lisp/pcomplete.el
lisp/shell.el

index e0322ae..61ef1a2 100644 (file)
@@ -1,5 +1,8 @@
 2011-08-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list.
+       * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161).
+
        * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop.
        Mark obsolete.
        * shell.el (shell-parse-pcomplete-arguments): New function.
index 02f3c4a..bdf2dad 100644 (file)
@@ -883,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'."
                        (or (run-hook-with-args-until-success
                             'pcomplete-quote-arg-hook filename index)
                            (when (memq c pcomplete-arg-quote-list)
-                             (string "\\" c))
+                             (string ?\\ c))
                            (char-to-string c))
                      (setq index (1+ index))))
                  filename
index 53472d9..01d1a68 100644 (file)
@@ -412,6 +412,8 @@ to `dirtrack-mode'."
        shell-dynamic-complete-functions)
   (set (make-local-variable 'pcomplete-parse-arguments-function)
        #'shell-parse-pcomplete-arguments)
+  (set (make-local-variable 'pcomplete-arg-quote-list)
+       (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil))
   (set (make-local-variable 'pcomplete-termination-string)
        (cond ((not comint-completion-addsuffix) "")
              ((stringp comint-completion-addsuffix)