diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 17:53:47 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 17:53:47 +0200 |
commit | 994b4e9a938d17d35462a8da3929fea267563c70 (patch) | |
tree | ad8e7d6365f1210229ad582a30987d11cb4f24e6 /lisp/mastodon-search.el | |
parent | 20d0f4ae848a2b8bc3bf8a63c409871d0e7991ff (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-search.el')
-rw-r--r-- | lisp/mastodon-search.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 00681c6..b54e8f3 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -134,7 +134,7 @@ Optionally add string TYPE after HEADING." (mastodon-tl--set-face (concat "\n " mastodon-tl--horiz-bar "\n " (upcase str) " " - (if type (upcase type) "") "\n" + (when type (upcase type)) "\n" " " mastodon-tl--horiz-bar (unless no-newline "\n")) 'success)) @@ -266,9 +266,8 @@ If NOTE is non-nil, include user's profile note. This is also 'mastodon-handle (concat "@" (cadr user)) 'help-echo (concat "Browse user profile of @" (cadr user))) " : \n" - (if note - (mastodon-tl--render-text (cadddr user) acct) - "") + (when note + (mastodon-tl--render-text (cadddr user) acct)) "\n") 'item-json acct))) ; for compat w other processing functions |