summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp-cmds.el9
2 files changed, 10 insertions, 4 deletions
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 <michael.albinus@gmx.de>
+
+ * net/tramp-cmds.el (tramp-cleanup-connection): Clean up
+ `tramp-current-connection' only when KEEP-PASSWORD is non-nil.
+
2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
* 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 "")