+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.
;; 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 "")