From 5d62213b4f8f92cb974c24c4ab0fc373fe806115 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 18 Mar 2023 22:17:45 +0100 Subject: refactor tl--map-alist-to-alist --- lisp/mastodon-views.el | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lisp/mastodon-views.el') diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index f92a9aa..d3865bc 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -398,10 +398,7 @@ If ACCOUNT-ID and HANDLE are provided use them rather than prompting." (mastodon-views--get-lists-names) nil t))) (list-id (or id (mastodon-views--get-list-id list-name))) (followings (mastodon-views--get-users-followings)) - (handles (mapcar (lambda (x) - (cons (alist-get 'acct x) - (alist-get 'id x))) - followings)) + (handles (mastodon-tl-map-alist-to-alist 'acct 'id followings)) (account (or handle (completing-read "Account to add: " handles nil t))) (account-id (or account-id (alist-get account handles nil nil 'equal))) @@ -437,10 +434,7 @@ If ID is provided, use that list." (mastodon-views--get-lists-names) nil t))) (list-id (or id (mastodon-views--get-list-id list-name))) (accounts (mastodon-views--accounts-in-list list-id)) - (handles (mapcar (lambda (x) - (cons (alist-get 'acct x) - (alist-get 'id x))) - accounts)) + (handles (mastodon-tl-map-alist-to-alist 'acct 'id accounts)) (account (completing-read "Account to remove: " handles nil t)) (account-id (alist-get account handles nil nil 'equal)) -- cgit v1.2.3