Mercurial > emacs
comparison lisp/net/ange-ftp.el @ 98390:e2da96799e45
* net/ange-ftp.el (ange-ftp-file-remote-p): Handle `localname' as
identification.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Mon, 29 Sep 2008 05:41:56 +0000 |
parents | 91e5880a36c1 |
children | c94ec53df9d8 |
comparison
equal
deleted
inserted
replaced
98389:05e41fd49efc | 98390:e2da96799e45 |
---|---|
4125 tmp1)))) | 4125 tmp1)))) |
4126 | 4126 |
4127 (defun ange-ftp-file-remote-p (file &optional identification connected) | 4127 (defun ange-ftp-file-remote-p (file &optional identification connected) |
4128 (let* ((parsed (ange-ftp-ftp-name file)) | 4128 (let* ((parsed (ange-ftp-ftp-name file)) |
4129 (host (nth 0 parsed)) | 4129 (host (nth 0 parsed)) |
4130 (user (nth 1 parsed))) | 4130 (user (nth 1 parsed)) |
4131 (localname (nth 2 parsed))) | |
4131 (and (or (not connected) | 4132 (and (or (not connected) |
4132 (let ((proc (get-process (ange-ftp-ftp-process-buffer host user)))) | 4133 (let ((proc (get-process (ange-ftp-ftp-process-buffer host user)))) |
4133 (and proc (processp proc) | 4134 (and proc (processp proc) |
4134 (memq (process-status proc) '(run open))))) | 4135 (memq (process-status proc) '(run open))))) |
4135 (cond | 4136 (cond |
4136 ((eq identification 'method) (and parsed "ftp")) | 4137 ((eq identification 'method) (and parsed "ftp")) |
4137 ((eq identification 'user) user) | 4138 ((eq identification 'user) user) |
4138 ((eq identification 'host) host) | 4139 ((eq identification 'host) host) |
4140 ((eq identification 'localname) localname) | |
4139 (t (ange-ftp-replace-name-component file "")))))) | 4141 (t (ange-ftp-replace-name-component file "")))))) |
4140 | 4142 |
4141 (defun ange-ftp-load (file &optional noerror nomessage nosuffix) | 4143 (defun ange-ftp-load (file &optional noerror nomessage nosuffix) |
4142 (if (ange-ftp-ftp-name file) | 4144 (if (ange-ftp-ftp-name file) |
4143 (let ((tryfiles (if nosuffix | 4145 (let ((tryfiles (if nosuffix |