diff options
| author | Richard M. Stallman | 1996-06-05 18:24:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-06-05 18:24:14 +0000 |
| commit | dbdfff7f1d1f15af351dee8671e94331411b6cb9 (patch) | |
| tree | f63b4363a5380889c80c70db685127a3223d240b | |
| parent | 1694bd160307fdbd5d1627b8d7c14baa7eb9efbc (diff) | |
| download | emacs-dbdfff7f1d1f15af351dee8671e94331411b6cb9.tar.gz emacs-dbdfff7f1d1f15af351dee8671e94331411b6cb9.zip | |
(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.
| -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'." | |||
| 1880 | (if (null comint-file-name-quote-list) | 1880 | (if (null comint-file-name-quote-list) |
| 1881 | filename | 1881 | filename |
| 1882 | (save-match-data | 1882 | (save-match-data |
| 1883 | (while (string-match "\\\\\\(.\\)" filename) | 1883 | (let ((i 0)) |
| 1884 | (setq filename (replace-match "\\1" nil nil filename))) | 1884 | (while (string-match "\\\\\\(.\\)" filename i) |
| 1885 | (setq filename (replace-match "\\1" nil nil filename)) | ||
| 1886 | (setq i (+ 1 (match-beginning 0))))) | ||
| 1885 | filename))) | 1887 | filename))) |
| 1886 | 1888 | ||
| 1887 | 1889 | ||
| @@ -1910,10 +1912,13 @@ completions listing is dependent on the value of `comint-completion-autolist'. | |||
| 1910 | Returns t if successful." | 1912 | Returns t if successful." |
| 1911 | (interactive) | 1913 | (interactive) |
| 1912 | (if (comint-match-partial-filename) | 1914 | (if (comint-match-partial-filename) |
| 1913 | (prog2 (or (window-minibuffer-p (selected-window)) | 1915 | (let ((directory-sep-char ?/)) |
| 1914 | (message "Completing file name...")) | 1916 | (if (memq system-type '(ms-dos windows-nt)) |
| 1915 | (comint-dynamic-complete-as-filename)))) | 1917 | ; The default shells on these systems require backslashed names |
| 1916 | 1918 | (setq directory-sep-char ?\\)) | |
| 1919 | (prog2 (or (window-minibuffer-p (selected-window)) | ||
| 1920 | (message "Completing file name...")) | ||
| 1921 | (comint-dynamic-complete-as-filename))))) | ||
| 1917 | 1922 | ||
| 1918 | (defun comint-dynamic-complete-as-filename () | 1923 | (defun comint-dynamic-complete-as-filename () |
| 1919 | "Dynamically complete at point as a filename. | 1924 | "Dynamically complete at point as a filename. |