Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3b973328
Commit
3b973328
authored
Apr 29, 1998
by
Geoff Voelker
Browse files
(file-name-handler-alist): Instead of substituting,
add regexps for file names with drive letters,
parent
c86212b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
lisp/ange-ftp.el
lisp/ange-ftp.el
+25
-14
No files found.
lisp/ange-ftp.el
View file @
3b973328
...
...
@@ -4064,24 +4064,35 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
;;; and colon).
;;; Don't allow the host name to end in a period--some systems use /.:
;;;###autoload
(let ((pattern (if (memq system-type '(ms-dos windows-nt))
"^[a-zA-Z]:/[^/:]*[^/:.]:"
"^/[^/:]*[^/:.]:")))
(or (assoc pattern file-name-handler-alist)
(setq file-name-handler-alist
(cons (cons pattern 'ange-ftp-hook-function)
file-name-handler-alist))))
(or (assoc "^/[^/:]*[^/:.]:" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
file-name-handler-alist)))
;;; Real ange-ftp file names prefixed with a drive letter.
;;;###autoload
(and (memq system-type '(ms-dos windows-nt))
(or (assoc "^[a-zA-Z]:/[^/:]*[^/:.]:" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^[a-zA-Z]:/[^/:]*[^/:.]:" . ange-ftp-hook-function)
file-name-handler-alist))))
;;; This regexp recognizes and absolute filenames with only one component,
;;; for the sake of hostname completion.
;;;###autoload
(let ((pattern (if (memq system-type '(ms-dos windows-nt))
"^[a-zA-Z]:/[^/:]*\\'"
"^/[^/:]*\\'")))
(or (assoc pattern file-name-handler-alist)
(setq file-name-handler-alist
(cons (cons pattern 'ange-ftp-completion-hook-function)
file-name-handler-alist))))
(or (assoc "^/[^/:]*\\'" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
file-name-handler-alist)))
;;; Absolute file names prefixed with a drive letter.
;;;###autoload
(and (memq system-type '(ms-dos windows-nt))
(or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^[a-zA-Z]:/[^/:]*\\'" .
ange-ftp-completion-hook-function)
file-name-handler-alist))))
;;; The above two forms are sufficient to cause this file to be loaded
;;; if the user ever uses a file name with a colon in it.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment