changeset 13311:f760b9b1cfc7

(ange-ftp-ftp-name,ange-ftp-replace-name-component): Use posix-string-match for complex regexp in `ange-ftp-name-format'. (ange-ftp-process-sentinel): Quote final * in buffer name match.
author Erik Naggum <erik@naggum.no>
date Sat, 28 Oct 1995 05:42:48 +0000
parents 5280c707658e
children d408464ad235
files lisp/ange-ftp.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Fri Oct 27 22:34:50 1995 +0000
+++ b/lisp/ange-ftp.el	Sat Oct 28 05:42:48 1995 +0000
@@ -1276,7 +1276,7 @@
     (setq ange-ftp-ftp-name-arg name
 	  ange-ftp-ftp-name-res
 	  (save-match-data
-	    (if (string-match (car ange-ftp-name-format) name)
+	    (if (posix-string-match (car ange-ftp-name-format) name)
 		(let* ((ns (cdr ange-ftp-name-format))
 		       (host (ange-ftp-ftp-name-component 0 ns name))
 		       (user (ange-ftp-ftp-name-component 1 ns name))
@@ -1290,7 +1290,7 @@
 ;; replace the name component with NAME.
 (defun ange-ftp-replace-name-component (fullname name)
   (save-match-data
-    (if (string-match (car ange-ftp-name-format) fullname)
+    (if (posix-string-match (car ange-ftp-name-format) fullname)
 	(let* ((ns (cdr ange-ftp-name-format))
 	       (elt (nth 2 ns)))
 	  (concat (substring fullname 0 (match-beginning elt))
@@ -1523,7 +1523,7 @@
 (defun ange-ftp-process-sentinel (proc str)
   "When ftp process changes state, nuke all file-entries in cache."
   (let ((name (process-name proc)))
-    (if (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)*" name)
+    (if (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)\\*" name)
 	(let ((user (substring name (match-beginning 1) (match-end 1)))
 	      (host (substring name (match-beginning 2) (match-end 2))))
 	  (ange-ftp-wipe-file-entries host user))))