]> git.eshelyaron.com Git - emacs.git/commitdiff
(ange-ftp-kill-ftp-process): Really use the BUFFER arg. Make it optional.
authorRichard M. Stallman <rms@gnu.org>
Tue, 18 Jun 1996 17:00:03 +0000 (17:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 18 Jun 1996 17:00:03 +0000 (17:00 +0000)
lisp/ange-ftp.el

index 2329cbf24e840a3c82831138398ff21dad6c78cc..634726892e1fb9691d92423a38869eec40ae45b7 100644 (file)
@@ -1361,14 +1361,15 @@ Optional DEFAULT is password to start with."
           (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