aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-06 17:53:47 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-06 17:53:47 +0200
commit994b4e9a938d17d35462a8da3929fea267563c70 (patch)
treead8e7d6365f1210229ad582a30987d11cb4f24e6 /lisp/mastodon-toot.el
parent20d0f4ae848a2b8bc3bf8a63c409871d0e7991ff (diff)
re-write all (if x y "") clauses as (when x y), if poss.
we can use when inside concat, but not inside insert, nor in strings/args headed for format or propertize.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index ae88d68..2232cc8 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1659,11 +1659,10 @@ REPLY-TEXT is the text of the toot being replied to."
(propertize "None "
'toot-attachments t)
"\n"
- (if reply-text
- (propertize
- (mastodon-toot--format-reply-in-compose reply-text)
- 'toot-reply t)
- "")
+ (when reply-text
+ (propertize
+ (mastodon-toot--format-reply-in-compose reply-text)
+ 'toot-reply t))
divider)
'face 'mastodon-toot-docs-face
'read-only "Edit your message below."
@@ -1757,6 +1756,7 @@ REPLY-REGION is a string to be injected into the buffer."
(if (equal "private" mastodon-toot--visibility)
"followers-only"
mastodon-toot--visibility)))
+ ;; WHEN clauses don't work here, we need "" as display arg:
(mastodon-toot--apply-fields-props
lang-region
(if mastodon-toot--language