aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-05-28 19:02:38 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-05-28 19:02:38 +0200
commit0bebd58588720537b5b9d949035d4f25db0b1dbc (patch)
tree58a4a0421ade5c5d7559f3406daa78855c893ba9 /lisp
parentfa54e20779d0f2420fe8d59ab44fdc05942f494f (diff)
set default language in compose buffer from
is set from mastodon-profile-acccount-preferences-data
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 3eadf91..f17cc85 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1878,11 +1878,20 @@ EDIT means we are editing an existing toot, not composing a new one."
(switch-to-buffer-other-window buffer)
(text-mode)
(mastodon-toot-mode t)
+ ;; set visibility:
(setq mastodon-toot--visibility
(or (plist-get mastodon-profile-account-settings 'privacy)
;; use toot visibility setting from the server:
(mastodon-profile--get-source-value 'privacy)
"public")) ; fallback
+ ;; default language:
+ ;; NB: this is not necessarily set in
+ ;; `mastodon-profile-credential-account' nor in
+ ;; `mastodon-profile-account-settings'!
+ (setq mastodon-toot--language
+ (alist-get 'posting:default:language
+ mastodon-profile-acccount-preferences-data))
+ ;; display original toot:
(if mastodon-toot-display-orig-in-reply-buffer
(progn
(mastodon-toot--display-docs-and-status-fields reply-text)