diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-06-08 05:50:12 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-06-08 05:50:12 +0000 |
commit | 1ac06c20eb09539df045c8a15b353718f7fc1086 (patch) | |
tree | 58d719f2f36df0b4b45fe3a0c82f0f9dbae1278b /lisp/ange-ftp.el | |
parent | 1a102a5863318e45e6fe51fac2fd848eb78f64e0 (diff) | |
download | emacs-1ac06c20eb09539df045c8a15b353718f7fc1086.tar.gz |
(ange-ftp-file-name-completion): Do hostname
completion in root directory of all drives on Windows.
(ange-ftp-file-name-all-completions): Fix regexp for detecting
root directory on drives.
(file-name-handler-alist): Remove the autoload tag from the
top-level form which changes file-name-handler-alist to support
Windows hostname completion.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r-- | lisp/ange-ftp.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 1cc7051d8fc..1deb9afdcfa 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -3782,7 +3782,7 @@ system TYPE.") completions))) (if (or (and (eq system-type 'windows-nt) - (string-match "^[a-zA-Z]:[/\]$" ange-ftp-this-dir)) + (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir)) (string-equal "/" ange-ftp-this-dir)) (nconc (all-completions file (ange-ftp-generate-root-prefixes)) (ange-ftp-real-file-name-all-completions file @@ -3814,7 +3814,9 @@ system TYPE.") file tbl ange-ftp-this-dir (function ange-ftp-file-entry-active-p))))))) - (if (string-equal "/" ange-ftp-this-dir) + (if (or (and (eq system-type 'windows-nt) + (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir)) + (string-equal "/" ange-ftp-this-dir)) (try-completion file (nconc (ange-ftp-generate-root-prefixes) @@ -4086,7 +4088,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function) file-name-handler-alist))) -;;; This regexp recognizes and absolute filenames with only one component, +;;; This regexp recognizes absolute filenames with only one component, ;;; for the sake of hostname completion. ;;;###autoload (or (assoc "^/[^/:]*\\'" file-name-handler-alist) @@ -4094,8 +4096,10 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function) file-name-handler-alist))) -;;; Absolute file names prefixed with a drive letter. -;;;###autoload +;;; This regexp recognizes absolute filenames with only one component +;;; on Windows, for the sake of hostname completion. +;;; NB. Do not mark this as autoload, because it is very common to +;;; do completions in the root directory of drives on Windows. (and (memq system-type '(ms-dos windows-nt)) (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist) (setq file-name-handler-alist |