aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-27 13:42:57 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-27 13:42:57 +0100
commit279aabbbeed7e12f7034d11c83079a7e6fdaeedd (patch)
tree1df101b2a585547a289ce151b821313da44d2a49 /lisp
parentf1c5b02512287a07899f793d667ce6924cbe88e8 (diff)
compose buffer - display language selection only when selected
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 40ff0ee..28733e1 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1211,6 +1211,9 @@ REPLY-TEXT is the text of the toot being replied to."
(propertize "Visibility"
'toot-post-visibility t)
" ⋅ "
+ (propertize "Language"
+ 'toot-post-language t)
+ " "
(propertize "CW"
'toot-post-cw-flag t)
" "
@@ -1264,6 +1267,8 @@ REPLY-JSON is the full JSON of the toot being replied to."
(point-min)))
(cw-region (mastodon-tl--find-property-range 'toot-post-cw-flag
(point-min)))
+ (lang-region (mastodon-tl--find-property-range 'toot-post-language
+ (point-min)))
(toot-string (buffer-substring-no-properties (cdr header-region)
(point-max))))
(add-text-properties (car count-region) (cdr count-region)
@@ -1279,10 +1284,16 @@ REPLY-JSON is the full JSON of the toot being replied to."
"private")
"followers-only"
mastodon-toot--visibility))))
+ (add-text-properties (car lang-region) (cdr lang-region)
+ (list 'display
+ (if mastodon-toot--language
+ (format "Language: %s"
+ mastodon-toot--language)
+ "")))
(add-text-properties (car nsfw-region) (cdr nsfw-region)
(list 'display (if mastodon-toot--content-nsfw
(if mastodon-toot--media-attachments
- "NSFW" "NSFW (no effect until attachments added)")
+ "NSFW" "NSFW (for attachments only)")
"")
'face 'mastodon-cw-face))
(add-text-properties (car cw-region) (cdr cw-region)