From efafde487f1a586837cb8f83b0fd6e09c937fcd6 Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Tue, 20 Feb 2024 12:02:45 +0100 Subject: [PATCH] Fix lirve--set-translation --- README.md | 2 +- lirve.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 216871a..7a21177 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Shows the translation of the verb when resolving or failing. Only available in Spanish (at the moment). ```elisp -(setq lirve--show-translation 'es) +(setq lirve--set-translation 'es) ``` I also recommend creating a function to make it easier to remember the command. diff --git a/lirve.el b/lirve.el index b63effb..4045633 100644 --- a/lirve.el +++ b/lirve.el @@ -30,6 +30,7 @@ (defvar lirve--verb-to-learn-simple-past nil) (defvar lirve--verb-to-learn-past-participle nil) (defvar lirve--translation "") +(defvar lirve--set-translation) ;; Set the translation language (defvar lirve--emoji-valid "✅") (defvar lirve--emoji-error "👎") (defvar lirve--widget-title nil) @@ -153,7 +154,7 @@ Argument INFINITIVE verb to remove." (setq lirve--verb-to-learn-infinitive (cdr (assq 'infinitive verb-to-learn))) (setq lirve--verb-to-learn-simple-past (cdr (assq 'simple-past verb-to-learn))) (setq lirve--verb-to-learn-past-participle (cdr (assq 'past-participle verb-to-learn))) - (when (not (null (boundp 'learning-irregular-verbs-in-English--show-translation))) (setq lirve--translation (cdr (assq lirve--show-translation (cdr (assq 'translations verb-to-learn)))))) + (when lirve--set-translation (setq lirve--translation (cdr (assq lirve--set-translation (cdr (assq 'translations verb-to-learn)))))) ;; Remove the verb from the list (when (not turn-unresolved) (setq lirve--verbs-shuffle (cdr lirve--verbs-shuffle))))