diff options
author | Holger Dürer <me@hdurer.net> | 2021-11-02 21:25:18 +0100 |
---|---|---|
committer | Holger Dürer <me@hdurer.net> | 2021-11-06 16:15:00 +0100 |
commit | d0bf4f196a9a30ea4e19b0b6fa5f9c5bfaf695b3 (patch) | |
tree | 32f718b43fc5e32b12df199da528effb125b9d3e /lisp/mastodon-auth.el | |
parent | 64bfd211fd48b674c1fa4d65d5b61ac86331d8e5 (diff) |
Convert most uses of `(cdr (assoc <some-symbol> <a-list>))` to `(alist-get <some-symbol> <a-list>)`
This is more readable and actually more efficient (maybe) since it
uses `eq` rather than `equal` as a test.
Diffstat (limited to 'lisp/mastodon-auth.el')
-rw-r--r-- | lisp/mastodon-auth.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el index b22b51e..e5767f1 100644 --- a/lisp/mastodon-auth.el +++ b/lisp/mastodon-auth.el @@ -158,11 +158,11 @@ Handle any errors from the server." (defun mastodon-auth--get-account-name () "Request user credentials and return an account name." - (cdr (assoc - 'acct - (mastodon-http--get-json - (mastodon-http--api - "accounts/verify_credentials"))))) + (alist-get + 'acct + (mastodon-http--get-json + (mastodon-http--api + "accounts/verify_credentials")))) (defun mastodon-auth--user-acct () "Return a mastodon user acct name." |