diff lisp/ange-ftp.el @ 4185:05a314aafd74

(file-name-handler-alist): Have two separate regexps with different hooks.
author Richard M. Stallman <rms@gnu.org>
date Tue, 20 Jul 1993 07:12:00 +0000
parents cd2afb94d892
children c050d8a0c3db
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Tue Jul 20 06:07:58 1993 +0000
+++ b/lisp/ange-ftp.el	Tue Jul 20 07:12:00 1993 +0000
@@ -856,7 +856,7 @@
 ;;;; 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 @@
 
 
 ;;; 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