summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-cmds.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-02-24 11:15:49 +0100
committerMichael Albinus <michael.albinus@gmx.de>2019-02-24 11:15:49 +0100
commitcbcb5718761dc645c291110ceb7250628510b1dc (patch)
tree038ecc23b83b8e6a1ff6b8d33b372af7d03d21a6 /lisp/net/tramp-cmds.el
parent975893b229072aa1b5565cc1a73987fa83ed5b21 (diff)
downloademacs-cbcb5718761dc645c291110ceb7250628510b1dc.tar.gz
emacs-cbcb5718761dc645c291110ceb7250628510b1dc.tar.bz2
emacs-cbcb5718761dc645c291110ceb7250628510b1dc.zip
Cleanup also recentf files in Tramp
* doc/misc/tramp.texi (Cleanup remote connections): Mention also recentf cache. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Call `tramp-recentf-cleanup'. * lisp/net/tramp-integration.el: New package. * lisp/net/tramp.el (tramp-rfn-eshadow-overlay) (tramp-rfn-eshadow-setup-minibuffer) (tramp-rfn-eshadow-update-overlay-regexp) (tramp-rfn-eshadow-update-overlay): (tramp-eshell-directory-change): Move to tramp-integration.el
Diffstat (limited to 'lisp/net/tramp-cmds.el')
-rw-r--r--lisp/net/tramp-cmds.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 325d19361cb..38e440e0930 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -118,7 +118,10 @@ When called interactively, a Tramp connection has to be selected."
(unless keep-debug
(get-buffer (tramp-debug-buffer-name vec)))
(tramp-get-connection-property vec "process-buffer" nil)))
- (when (bufferp buf) (kill-buffer buf)))))
+ (when (bufferp buf) (kill-buffer buf)))
+
+ ;; Remove recentf files.
+ (tramp-recentf-cleanup vec)))
;;;###tramp-autoload
(defun tramp-cleanup-this-connection ()
@@ -162,7 +165,11 @@ This includes password cache, file cache, connection cache, buffers."
;; Remove buffers.
(dolist (name (tramp-list-tramp-buffers))
- (when (bufferp (get-buffer name)) (kill-buffer name))))
+ (when (bufferp (get-buffer name)) (kill-buffer name)))
+
+ ;; Remove recentf files.
+ (dolist (v (tramp-list-connections))
+ (tramp-recentf-cleanup v)))
;;;###tramp-autoload
(defun tramp-cleanup-all-buffers ()