emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon 792e18037d 27/45: Use `equal' to access alist ent


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon 792e18037d 27/45: Use `equal' to access alist entries by `mastodon-instance-url'
Date: Thu, 1 Feb 2024 10:00:58 -0500 (EST)

branch: elpa/mastodon
commit 792e18037d2de677d969cabd19bdf1086e760218
Author: David Edmondson <dme@dme.org>
Commit: David Edmondson <dme@dme.org>

    Use `equal' to access alist entries by `mastodon-instance-url'
    
    If a user re-loads their mastodon.el configuration within an emacs
    session after using mastodon.el, the variable `mastodon-instance-url'
    may no longer be considered `eq' to the original value, even if they
    are the same string.
    
    To avoid this problem, compare using `equal'.
---
 lisp/mastodon-auth.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 1a3e539388..279377ba2d 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -172,13 +172,13 @@ When ASK is absent return nil."
 Generate/save token if none known yet."
   (cond (mastodon-auth--token-alist
          ;; user variables are known and initialised.
-         (alist-get mastodon-instance-url mastodon-auth--token-alist))
+         (alist-get mastodon-instance-url mastodon-auth--token-alist nil nil 
#'equal))
         ((plist-get (mastodon-client--active-user) :access_token)
          ;; user variables need to be read from plstore.
          (push (cons mastodon-instance-url
                      (plist-get (mastodon-client--active-user) :access_token))
                mastodon-auth--token-alist)
-         (alist-get mastodon-instance-url mastodon-auth--token-alist))
+         (alist-get mastodon-instance-url mastodon-auth--token-alist nil nil 
#'equal))
         ((null mastodon-active-user)
          ;; user not aware of 2FA-related changes and has not set
          ;; `mastodon-active-user'. Make user aware and error out.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]