diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-06-05 18:24:14 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-06-05 18:24:14 +0000 |
commit | dbdfff7f1d1f15af351dee8671e94331411b6cb9 (patch) | |
tree | f63b4363a5380889c80c70db685127a3223d240b /lisp/comint.el | |
parent | 1694bd160307fdbd5d1627b8d7c14baa7eb9efbc (diff) | |
download | emacs-dbdfff7f1d1f15af351dee8671e94331411b6cb9.tar.gz |
(comint-dynamic-complete-filename) [ms-dos, windows-nt]:
Always use backslash as a directory separator when completing
in shell mode on these systems.
(comint-unquote-filename): Handle quoted backslashes.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index fca83137fdd..c7522fefff7 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1880,8 +1880,10 @@ Magic characters are those in `comint-file-name-quote-list'." (if (null comint-file-name-quote-list) filename (save-match-data - (while (string-match "\\\\\\(.\\)" filename) - (setq filename (replace-match "\\1" nil nil filename))) + (let ((i 0)) + (while (string-match "\\\\\\(.\\)" filename i) + (setq filename (replace-match "\\1" nil nil filename)) + (setq i (+ 1 (match-beginning 0))))) filename))) @@ -1910,10 +1912,13 @@ completions listing is dependent on the value of `comint-completion-autolist'. Returns t if successful." (interactive) (if (comint-match-partial-filename) - (prog2 (or (window-minibuffer-p (selected-window)) - (message "Completing file name...")) - (comint-dynamic-complete-as-filename)))) - + (let ((directory-sep-char ?/)) + (if (memq system-type '(ms-dos windows-nt)) + ; The default shells on these systems require backslashed names + (setq directory-sep-char ?\\)) + (prog2 (or (window-minibuffer-p (selected-window)) + (message "Completing file name...")) + (comint-dynamic-complete-as-filename))))) (defun comint-dynamic-complete-as-filename () "Dynamically complete at point as a filename. |