* net/ange-ftp.el: (ange-ftp-file-remote-p): Handle optional

parameter IDENTIFICATION.
This commit is contained in:
Michael Albinus 2007-07-17 21:09:12 +00:00
parent 05c7c7b162
commit 3bd84a2269

View file

@ -4132,15 +4132,19 @@ directory, so that Emacs will know its current contents."
(format "Getting %s" fn1))
tmp1))))
(defun ange-ftp-file-remote-p (file &optional connected)
(and (or (not connected)
(let* ((parsed (ange-ftp-ftp-name file))
(host (nth 0 parsed))
(user (nth 1 parsed))
(proc (get-process (ange-ftp-ftp-process-buffer host user))))
(and proc (processp proc)
(memq (process-status proc) '(run open)))))
(ange-ftp-replace-name-component file "")))
(defun ange-ftp-file-remote-p (file &optional identification connected)
(let* ((parsed (ange-ftp-ftp-name file))
(host (nth 0 parsed))
(user (nth 1 parsed)))
(and (or (not connected)
(let ((proc (get-process (ange-ftp-ftp-process-buffer host user))))
(and proc (processp proc)
(memq (process-status proc) '(run open)))))
(cond
((eq identification 'method) (and parsed "ftp"))
((eq identification 'user) user)
((eq identification 'host) host)
(t (ange-ftp-replace-name-component file ""))))))
(defun ange-ftp-load (file &optional noerror nomessage nosuffix)
(if (ange-ftp-ftp-name file)