# HG changeset patch # User Richard M. Stallman # Date 835117203 0 # Node ID 8e6b770317a553bb4b5df54d4ea6613b8ac5e594 # Parent 593dadb4f2877598182865501aa6840c82219cf0 (ange-ftp-kill-ftp-process): Really use the BUFFER arg. Make it optional. diff -r 593dadb4f287 -r 8e6b770317a5 lisp/ange-ftp.el --- a/lisp/ange-ftp.el Tue Jun 18 16:52:09 1996 +0000 +++ b/lisp/ange-ftp.el Tue Jun 18 17:00:03 1996 +0000 @@ -1361,14 +1361,15 @@ (ange-ftp-ftp-name buffer-file-name)) (auto-save-mode ange-ftp-auto-save))) -(defun ange-ftp-kill-ftp-process (buffer) - "Kill the FTP process associated with BUFFER. +(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))) - (let ((file (or (buffer-file-name) default-directory))) + (let ((file (or (buffer-file-name buffer) + (save-excursion (set-buffer buffer) default-directory)))) (if file (let ((parsed (ange-ftp-ftp-name (expand-file-name file)))) (if parsed