From adccdcd22a527720efaa38f57f3077d70687bdfe Mon Sep 17 00:00:00 2001 From: mousebot Date: Tue, 5 Apr 2022 17:10:51 +0200 Subject: toot: message if translate-toot called without lingva.el --- lisp/mastodon-toot.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.3