changeset 15449:8e6b770317a5

(ange-ftp-kill-ftp-process): Really use the BUFFER arg. Make it optional.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Jun 1996 17:00:03 +0000
parents 593dadb4f287
children 0889d4d30f3a
files lisp/ange-ftp.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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