aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Voelker1998-04-29 04:31:03 +0000
committerGeoff Voelker1998-04-29 04:31:03 +0000
commit3b9733284cf5b08fee7ae27f93fd34c5d0290b85 (patch)
tree3c2a45dc4f6cf5bab014cb746346d4fde2276a52
parentc86212b98bbe9ecd358899cb4b136b3133dbcc5b (diff)
downloademacs-3b9733284cf5b08fee7ae27f93fd34c5d0290b85.tar.gz
emacs-3b9733284cf5b08fee7ae27f93fd34c5d0290b85.zip
(file-name-handler-alist): Instead of substituting,
add regexps for file names with drive letters,
-rw-r--r--lisp/ange-ftp.el39
1 files changed, 25 insertions, 14 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 8bd0955fd2f..0d29b9c5dc5 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -4064,24 +4064,35 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4064;;; and colon). 4064;;; and colon).
4065;;; Don't allow the host name to end in a period--some systems use /.: 4065;;; Don't allow the host name to end in a period--some systems use /.:
4066;;;###autoload 4066;;;###autoload
4067(let ((pattern (if (memq system-type '(ms-dos windows-nt)) 4067(or (assoc "^/[^/:]*[^/:.]:" file-name-handler-alist)
4068 "^[a-zA-Z]:/[^/:]*[^/:.]:" 4068 (setq file-name-handler-alist
4069 "^/[^/:]*[^/:.]:"))) 4069 (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
4070 (or (assoc pattern file-name-handler-alist) 4070 file-name-handler-alist)))
4071 (setq file-name-handler-alist 4071
4072 (cons (cons pattern 'ange-ftp-hook-function) 4072;;; Real ange-ftp file names prefixed with a drive letter.
4073 file-name-handler-alist)))) 4073;;;###autoload
4074(and (memq system-type '(ms-dos windows-nt))
4075 (or (assoc "^[a-zA-Z]:/[^/:]*[^/:.]:" file-name-handler-alist)
4076 (setq file-name-handler-alist
4077 (cons '("^[a-zA-Z]:/[^/:]*[^/:.]:" . ange-ftp-hook-function)
4078 file-name-handler-alist))))
4074 4079
4075;;; This regexp recognizes and absolute filenames with only one component, 4080;;; This regexp recognizes and absolute filenames with only one component,
4076;;; for the sake of hostname completion. 4081;;; for the sake of hostname completion.
4077;;;###autoload 4082;;;###autoload
4078(let ((pattern (if (memq system-type '(ms-dos windows-nt)) 4083(or (assoc "^/[^/:]*\\'" file-name-handler-alist)
4079 "^[a-zA-Z]:/[^/:]*\\'" 4084 (setq file-name-handler-alist
4080 "^/[^/:]*\\'"))) 4085 (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
4081 (or (assoc pattern file-name-handler-alist) 4086 file-name-handler-alist)))
4082 (setq file-name-handler-alist 4087
4083 (cons (cons pattern 'ange-ftp-completion-hook-function) 4088;;; Absolute file names prefixed with a drive letter.
4084 file-name-handler-alist)))) 4089;;;###autoload
4090(and (memq system-type '(ms-dos windows-nt))
4091 (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist)
4092 (setq file-name-handler-alist
4093 (cons '("^[a-zA-Z]:/[^/:]*\\'" .
4094 ange-ftp-completion-hook-function)
4095 file-name-handler-alist))))
4085 4096
4086;;; The above two forms are sufficient to cause this file to be loaded 4097;;; The above two forms are sufficient to cause this file to be loaded
4087;;; if the user ever uses a file name with a colon in it. 4098;;; if the user ever uses a file name with a colon in it.