changeset 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 b056a93eb26f
children 7124d8656633
files lisp/ChangeLog lisp/eshell/esh-arg.el
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jul 17 06:21:14 2008 +0000
+++ b/lisp/ChangeLog	Thu Jul 17 08:44:20 2008 +0000
@@ -1,3 +1,8 @@
+2008-07-17  Fan Kai  <fktpp@xemacs.org>
+
+	* esh-arg.el (eshell-quote-backslash): Fix eshell path completion
+	for Windows.
+
 2008-07-17  Daiki Ueno  <ueno@unixuser.org>
 
 	* epa.el (epa-key-list-mode): Use run-mode-hooks.
--- 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)))))