Function: ange-ftp-kill-ftp-process
ange-ftp-kill-ftp-process is an interactive and byte-compiled function
defined in ange-ftp.el.gz.
Signature
(ange-ftp-kill-ftp-process &optional BUFFER)
Documentation
Kill the FTP process associated with BUFFER (the current buffer, if nil).
If the BUFFER's visited filename or default-directory is an FTP filename
then kill the related FTP process.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-kill-ftp-process (&optional buffer)
"Kill the FTP process associated with BUFFER (the current buffer, if nil).
If the BUFFER's visited filename or `default-directory' is an FTP filename
then kill the related FTP process."
(interactive "bKill FTP process associated with buffer: ")
(if (null buffer)
(setq buffer (current-buffer))
(setq buffer (get-buffer buffer)))
(let ((file (or (buffer-file-name buffer)
(with-current-buffer buffer default-directory))))
(if file
(let ((parsed (ange-ftp-ftp-name (expand-file-name file))))
(if parsed
(let ((host (nth 0 parsed))
(user (nth 1 parsed)))
(kill-buffer (get-buffer (ange-ftp-ftp-process-buffer host user)))))))))