From 516ce2cdc4ce293aed393440aaac29944a7d5a55 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 21 Sep 2016 12:00:11 +0200 Subject: [PATCH] * lisp/net/tramp.el (tramp-clear-passwd): Call also `auth-source-forget'. --- lisp/net/tramp.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2a8a5ef15fa..2361b078c99 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1314,8 +1314,8 @@ necessary only. This function will be used in file name completion." "Get the connection buffer to be used for VEC." (or (get-buffer (tramp-buffer-name vec)) (with-current-buffer (get-buffer-create (tramp-buffer-name vec)) - ;; We use existence of connection property "process-buffer" as - ;; indication, whether a connection is active. + ;; We use the existence of connection property "process-buffer" + ;; as indication, whether a connection is active. (tramp-set-connection-property vec "process-buffer" (tramp-get-connection-property vec "process-buffer" nil)) @@ -4194,6 +4194,14 @@ Invokes `password-read' if available, `read-passwd' else." (replace-regexp-in-string (concat tramp-postfix-hop-regexp "$") tramp-postfix-host-format hop)))))) + ;; `auth-source-forget' has been obsoleted with Emacs 24.1. But + ;; there is no known replacement. + (when (fboundp 'auth-source-forget) + (auth-source-forget + `(:max 1 + :user ,(or (tramp-file-name-user vec) t) + :host ,(tramp-file-name-host vec) + :port ,(tramp-file-name-method vec)))) (password-cache-remove (tramp-make-tramp-file-name (tramp-file-name-method vec) -- 2.11.4.GIT