aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-25 19:53:37 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-25 19:53:37 +0100
commite3e3dc0227f8fd83c53a611bfb63c37595cd35cf (patch)
treef9c5c19a57cef895fbee0603224c6e3682c433fe /lisp/mastodon-toot.el
parenteca8401b6ed04ed0f787efcd8517b022c55f9ed7 (diff)
filter user posts by language. NB: we flip mastodon-iso-639-1!
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 59a3813..21bfe96 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1117,14 +1117,11 @@ LENGTH is the maximum character length allowed for a poll option."
(defun mastodon-toot--set-toot-lang ()
"Prompt for a language and return its two letter ISO 639 1 code."
(interactive)
- (let* ((langs (mapcar (lambda (x)
- (cons (cadr x)
- (car x)))
- mastodon-iso-639-1))
- (choice (completing-read "Language for this toot: "
- langs)))
+ (let* ((choice (completing-read "Language for this toot: "
+ mastodon-iso-639-1)))
(setq mastodon-toot--language
- (alist-get choice langs nil nil 'equal))))
+ (alist-get choice mastodon-iso-639-1 nil nil 'equal))
+ (message "Language set to %s" choice)))
;; we'll need to revisit this if the binds get
;; more diverse than two-chord bindings