diff lisp/eshell/esh-arg.el @ 96761:b117e2fe7552

2008-07-17 Fan Kai <fktpp@xemacs.org> * esh-arg.el (eshell-quote-backslash): Fix eshell path completion for Windows.
author John Wiegley <johnw@newartisans.com>
date Thu, 17 Jul 2008 08:44:20 +0000
parents 885e5368ecb2
children f6dee8e9b0f2
line wrap: on
line diff
--- a/lisp/eshell/esh-arg.el	Thu Jul 17 06:21:14 2008 +0000
+++ b/lisp/eshell/esh-arg.el	Thu Jul 17 08:44:20 2008 +0000
@@ -282,7 +282,11 @@
   "Intelligently backslash the character occurring in STRING at INDEX.
 If the character is itself a backslash, it needs no escaping."
   (let ((char (aref string index)))
-    (if (eq char ?\\)
+    (if (and (eq char ?\\) 
+	     (not (and (featurep 'mswindows)
+		       (eq directory-sep-char ?\\)
+		       (eq (1- (string-width string))
+			   index))))
 	(char-to-string char)
       (if (memq char eshell-special-chars-outside-quoting)
 	  (string ?\\ char)))))