aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-04-05 17:10:51 +0200
committermousebot <mousebot@riseup.net>2022-04-05 17:10:51 +0200
commitadccdcd22a527720efaa38f57f3077d70687bdfe (patch)
treec3b274af466abf3d044e6f8f9c113fce35816c87 /lisp
parent2fbf4694672e8dfa53767e6e2402490fa871d824 (diff)
toot: message if translate-toot called without lingva.el
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6521b16..f8d0642 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -285,10 +285,12 @@ Makes a POST request to the server."
(message "Toot content copied to the clipboard.")))
;; (when (require 'lingva nil :no-error)
- (defun mastodon-toot--translate-toot-text ()
- "Translate text of toot at point.
+(defun mastodon-toot--translate-toot-text ()
+ "Translate text of toot at point.
Uses `lingva.el'."
- (interactive)
+ (interactive)
+ (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