Subject: bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows

From: Stefan Monnier <[email-masked]>
Date: Wed, 09 May 2012 13:22:30 -0400

> Thanks.  This fixes the original recipe.  But the following minor
> variation (which works correctly in Emacs 23.3) still misfires:
>   M-! cd "d:\gnu TAB
> I get "d:\/gnu/ after I press TAB above.

The patch below (which I just installed) might fix it.

        Stefan

=== modified file 'lisp/shell.el'
--- lisp/shell.el	2012-05-08 00:27:13 +0000
+++ lisp/shell.el	2012-05-09 17:18:21 +0000
@@ -400,8 +400,9 @@
                      (t (match-string 3)))
                     arg))
              ((match-beginning 2)       ;Double quote.
-              (push (replace-regexp-in-string
-                     "\\\\\\(.\\)" "\\1" (match-string 2))
+              (push (if (null pcomplete-arg-quote-list) (match-string 2)
+                      (replace-regexp-in-string
+                       "\\\\\\(.\\)" "\\1" (match-string 2)))
                     arg))
              ((match-beginning 1)       ;Single quote.
               (push (match-string 1) arg))