aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-07 20:19:09 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-08 08:16:34 +0200
commita98c5182a589b88d73f289ebf741612bd7b924b9 (patch)
treeef81905a445e32195986471d9462d59163361698 /lisp/mastodon-toot.el
parent87e6975d7ff26aeaca1b2020dd2a3ccfd9d6e1a2 (diff)
if-let for translate-toot
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index f07e61a..8474bca 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -531,13 +531,12 @@ Uses `lingva.el'."
(if (not (require 'lingva nil :no-error))
(message "Looks like you need to install lingva.el first.")
(if mastodon-tl--buffer-spec
- (let ((toot (mastodon-tl--property 'toot-json)))
- (if toot
- (lingva-translate nil
- (mastodon-tl--content toot)
- (when mastodon-tl--enable-proportional-fonts
- t))
- (message "No toot to translate?")))
+ (if-let ((toot (mastodon-tl--property 'toot-json)))
+ (lingva-translate nil
+ (mastodon-tl--content toot)
+ (when mastodon-tl--enable-proportional-fonts
+ t))
+ (message "No toot to translate?"))
(message "No mastodon buffer?"))))
(defun mastodon-toot--own-toot-p (toot)