aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-08 05:50:12 +0000
committerRichard M. Stallman1998-06-08 05:50:12 +0000
commit1ac06c20eb09539df045c8a15b353718f7fc1086 (patch)
tree58d719f2f36df0b4b45fe3a0c82f0f9dbae1278b
parent1a102a5863318e45e6fe51fac2fd848eb78f64e0 (diff)
downloademacs-1ac06c20eb09539df045c8a15b353718f7fc1086.tar.gz
emacs-1ac06c20eb09539df045c8a15b353718f7fc1086.zip
(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.
-rw-r--r--lisp/ange-ftp.el14
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.")
3782 completions))) 3782 completions)))
3783 3783
3784 (if (or (and (eq system-type 'windows-nt) 3784 (if (or (and (eq system-type 'windows-nt)
3785 (string-match "^[a-zA-Z]:[/\]$" ange-ftp-this-dir)) 3785 (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
3786 (string-equal "/" ange-ftp-this-dir)) 3786 (string-equal "/" ange-ftp-this-dir))
3787 (nconc (all-completions file (ange-ftp-generate-root-prefixes)) 3787 (nconc (all-completions file (ange-ftp-generate-root-prefixes))
3788 (ange-ftp-real-file-name-all-completions file 3788 (ange-ftp-real-file-name-all-completions file
@@ -3814,7 +3814,9 @@ system TYPE.")
3814 file tbl ange-ftp-this-dir 3814 file tbl ange-ftp-this-dir
3815 (function ange-ftp-file-entry-active-p))))))) 3815 (function ange-ftp-file-entry-active-p)))))))
3816 3816
3817 (if (string-equal "/" ange-ftp-this-dir) 3817 (if (or (and (eq system-type 'windows-nt)
3818 (string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir))
3819 (string-equal "/" ange-ftp-this-dir))
3818 (try-completion 3820 (try-completion
3819 file 3821 file
3820 (nconc (ange-ftp-generate-root-prefixes) 3822 (nconc (ange-ftp-generate-root-prefixes)
@@ -4086,7 +4088,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4086 (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function) 4088 (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
4087 file-name-handler-alist))) 4089 file-name-handler-alist)))
4088 4090
4089;;; This regexp recognizes and absolute filenames with only one component, 4091;;; This regexp recognizes absolute filenames with only one component,
4090;;; for the sake of hostname completion. 4092;;; for the sake of hostname completion.
4091;;;###autoload 4093;;;###autoload
4092(or (assoc "^/[^/:]*\\'" file-name-handler-alist) 4094(or (assoc "^/[^/:]*\\'" file-name-handler-alist)
@@ -4094,8 +4096,10 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4094 (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function) 4096 (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
4095 file-name-handler-alist))) 4097 file-name-handler-alist)))
4096 4098
4097;;; Absolute file names prefixed with a drive letter. 4099;;; This regexp recognizes absolute filenames with only one component
4098;;;###autoload 4100;;; on Windows, for the sake of hostname completion.
4101;;; NB. Do not mark this as autoload, because it is very common to
4102;;; do completions in the root directory of drives on Windows.
4099(and (memq system-type '(ms-dos windows-nt)) 4103(and (memq system-type '(ms-dos windows-nt))
4100 (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist) 4104 (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist)
4101 (setq file-name-handler-alist 4105 (setq file-name-handler-alist