aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-18 17:00:03 +0000
committerRichard M. Stallman1996-06-18 17:00:03 +0000
commitc360b9251bb7e0979839433d283f2197852fa94d (patch)
treec9f710ff3c919d187a9dbb1c9eddc566bf36809d
parent9becbeca26e360f9e9b5020a8e32748c11917883 (diff)
downloademacs-c360b9251bb7e0979839433d283f2197852fa94d.tar.gz
emacs-c360b9251bb7e0979839433d283f2197852fa94d.zip
(ange-ftp-kill-ftp-process): Really use the BUFFER arg. Make it optional.
-rw-r--r--lisp/ange-ftp.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 2329cbf24e8..634726892e1 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -1361,14 +1361,15 @@ Optional DEFAULT is password to start with."
1361 (ange-ftp-ftp-name buffer-file-name)) 1361 (ange-ftp-ftp-name buffer-file-name))
1362 (auto-save-mode ange-ftp-auto-save))) 1362 (auto-save-mode ange-ftp-auto-save)))
1363 1363
1364(defun ange-ftp-kill-ftp-process (buffer) 1364(defun ange-ftp-kill-ftp-process (&optional buffer)
1365 "Kill the FTP process associated with BUFFER. 1365 "Kill the FTP process associated with BUFFER (the current buffer, if nil).
1366If the BUFFER's visited filename or default-directory is an ftp filename 1366If the BUFFER's visited filename or default-directory is an ftp filename
1367then kill the related ftp process." 1367then kill the related ftp process."
1368 (interactive "bKill FTP process associated with buffer: ") 1368 (interactive "bKill FTP process associated with buffer: ")
1369 (if (null buffer) 1369 (if (null buffer)
1370 (setq buffer (current-buffer))) 1370 (setq buffer (current-buffer)))
1371 (let ((file (or (buffer-file-name) default-directory))) 1371 (let ((file (or (buffer-file-name buffer)
1372 (save-excursion (set-buffer buffer) default-directory))))
1372 (if file 1373 (if file
1373 (let ((parsed (ange-ftp-ftp-name (expand-file-name file)))) 1374 (let ((parsed (ange-ftp-ftp-name (expand-file-name file))))
1374 (if parsed 1375 (if parsed