From: Michael Albinus Date: Mon, 25 Nov 2013 14:51:34 +0000 (+0100) Subject: * net/tramp-cmds.el (tramp-cleanup-connection): Clean up X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~706 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05ca27d8bdd231f5c67558decc3d708d263fdcca;p=emacs.git * net/tramp-cmds.el (tramp-cleanup-connection): Clean up `tramp-current-connection' only when KEEP-PASSWORD is non-nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c89b7b1166..3b46af790a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-25 Michael Albinus + + * net/tramp-cmds.el (tramp-cleanup-connection): Clean up + `tramp-current-connection' only when KEEP-PASSWORD is non-nil. + 2013-11-25 Stefan Monnier * play/gomoku.el: Don't use intangible property. Use lexical-binding. diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 35f23caa51a..276651576d7 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -85,13 +85,14 @@ When called interactively, a Tramp connection has to be selected." ;; Nothing to do. (message "No Tramp connection found.") - ;; Cleanup `tramp-current-connection'. Otherwise, we would be - ;; suppressed in the test suite. - (setq tramp-current-connection nil) - ;; Flush password cache. (unless keep-password (tramp-clear-passwd vec)) + ;; Cleanup `tramp-current-connection'. Otherwise, we would be + ;; suppressed in the test suite. We use `keep-password' as + ;; indicator; it is not worth to add a new argument. + (when keep-password (setq tramp-current-connection nil)) + ;; Flush file cache. (tramp-flush-directory-property vec "")