From 0628c764af5c887fceda7e03e7d84dc0b4e1e568 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 20 Jul 1993 07:12:00 +0000 Subject: [PATCH] (file-name-handler-alist): Have two separate regexps with different hooks. --- lisp/ange-ftp.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 29324c3a6a5..3ce5d055193 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -856,7 +856,7 @@ SIZE, if supplied, should be a prime number." ;;;; Internal variables. ;;;; ------------------------------------------------------------ -(defconst ange-ftp-version "$Revision: 1.29 $") +(defconst ange-ftp-version "$Revision: 1.30 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") @@ -3750,12 +3750,19 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") ;;; This regexp takes care of real ange-ftp file names (with a slash -;;; and colon), and absolute filenames with only one component, for -;;; the sake of hostname completion. +;;; and colon). ;;;###autoload -(or (assoc "^/[^/:]*\\([^/:]:\\|\\'\\)" file-name-handler-alist) +(or (assoc "^/[^/:]*[^/:]:" file-name-handler-alist) (setq file-name-handler-alist - (cons '("^/[^/:]*\\([^/:]:\\|\\'\\)" . ange-ftp-hook-function) + (cons '("^/[^/:]*[^/:]:" . 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 +(or (assoc "^/[^/:]*\\'" file-name-handler-alist) + (setq file-name-handler-alist + (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function) file-name-handler-alist))) ;;; The above two forms are sufficient to cause this file to be loaded -- 2.39.5