branch: elpa/mastodon
commit 642f39becf5d2f54bca1ce6e2014f6724944ab7b
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
clear client/auth variables in forget-logins.
---
lisp/mastodon.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 16b9b459a1..daf6f28dba 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -198,11 +198,17 @@ and X others...\"."
;;;###autoload
(defun mastodon-forget-all-logins ()
- "Delete `mastodon-client--token-file'."
+ "Delete `mastodon-client--token-file'.
+Also nil `mastodon-auth--token-alist'."
(interactive)
(when (y-or-n-p "Remove all saved login data?")
- (delete-file mastodon-client--token-file)
- (message "File %s deleted." mastodon-client--token-file)))
+ (if (not (file-exists-p mastodon-client--token-file))
+ (message "No plstore file")
+ (delete-file mastodon-client--token-file)
+ (message "File %s deleted." mastodon-client--token-file))
+ ;; nil some vars too:
+ (setq mastodon-client--active-user-details-plist nil)
+ (setq mastodon-auth--token-alist nil)))
(defvar mastodon-mode-map
(let ((map (make-sparse-keymap)))