diff options
| author | Michael Albinus | 2007-07-17 21:09:12 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-07-17 21:09:12 +0000 |
| commit | 3bd84a2269913f7f5ee41c779a610b22d58c2d01 (patch) | |
| tree | 463ae1f8f325aaded86d4d04c3cc5297dc196d99 | |
| parent | 05c7c7b162827d99fbb0f0a3f80e51173525c174 (diff) | |
| download | emacs-3bd84a2269913f7f5ee41c779a610b22d58c2d01.tar.gz emacs-3bd84a2269913f7f5ee41c779a610b22d58c2d01.zip | |
* net/ange-ftp.el: (ange-ftp-file-remote-p): Handle optional
parameter IDENTIFICATION.
| -rw-r--r-- | lisp/net/ange-ftp.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 3fa75102b32..24a30603bb9 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -4132,15 +4132,19 @@ directory, so that Emacs will know its current contents." | |||
| 4132 | (format "Getting %s" fn1)) | 4132 | (format "Getting %s" fn1)) |
| 4133 | tmp1)))) | 4133 | tmp1)))) |
| 4134 | 4134 | ||
| 4135 | (defun ange-ftp-file-remote-p (file &optional connected) | 4135 | (defun ange-ftp-file-remote-p (file &optional identification connected) |
| 4136 | (and (or (not connected) | 4136 | (let* ((parsed (ange-ftp-ftp-name file)) |
| 4137 | (let* ((parsed (ange-ftp-ftp-name file)) | 4137 | (host (nth 0 parsed)) |
| 4138 | (host (nth 0 parsed)) | 4138 | (user (nth 1 parsed))) |
| 4139 | (user (nth 1 parsed)) | 4139 | (and (or (not connected) |
| 4140 | (proc (get-process (ange-ftp-ftp-process-buffer host user)))) | 4140 | (let ((proc (get-process (ange-ftp-ftp-process-buffer host user)))) |
| 4141 | (and proc (processp proc) | 4141 | (and proc (processp proc) |
| 4142 | (memq (process-status proc) '(run open))))) | 4142 | (memq (process-status proc) '(run open))))) |
| 4143 | (ange-ftp-replace-name-component file ""))) | 4143 | (cond |
| 4144 | ((eq identification 'method) (and parsed "ftp")) | ||
| 4145 | ((eq identification 'user) user) | ||
| 4146 | ((eq identification 'host) host) | ||
| 4147 | (t (ange-ftp-replace-name-component file "")))))) | ||
| 4144 | 4148 | ||
| 4145 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) | 4149 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) |
| 4146 | (if (ange-ftp-ftp-name file) | 4150 | (if (ange-ftp-ftp-name file) |