From 994b4e9a938d17d35462a8da3929fea267563c70 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 6 Aug 2024 17:53:47 +0200 Subject: 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. --- lisp/mastodon-toot.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp/mastodon-toot.el') 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 -- cgit v1.2.3