diff options
author | mousebot <mousebot@riseup.net> | 2022-04-05 17:10:51 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-04-05 17:10:51 +0200 |
commit | adccdcd22a527720efaa38f57f3077d70687bdfe (patch) | |
tree | c3b274af466abf3d044e6f8f9c113fce35816c87 | |
parent | 2fbf4694672e8dfa53767e6e2402490fa871d824 (diff) |
toot: message if translate-toot called without lingva.el
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
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 |