From 7843363225800f69610cdafd245aa6595e748962 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 29 Nov 2021 10:25:35 +0300 Subject: feat(tazjin/russian): Remember the last displayed word This will make it possible to do operations on that word (i.e. marking it as known, or opening the full definition page). Change-Id: Ib77f7d2e4e96d6ab754b311a69f72e2b080657ac --- users/tazjin/russian/russian.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'users/tazjin/russian') diff --git a/users/tazjin/russian/russian.el b/users/tazjin/russian/russian.el index 448b240a7063..94245f07c123 100644 --- a/users/tazjin/russian/russian.el +++ b/users/tazjin/russian/russian.el @@ -82,7 +82,9 @@ (defun display-random-russian-word () (interactive) - (message (russian--format-word (seq-random-elt (ht-values russian-words))))) + (let ((word (seq-random-elt (ht-values russian-words)))) + (setq russian--last-word word) + (message (russian--format-word word)))) (defvar russian--display-timer (run-with-idle-timer 5 t #'display-random-russian-word)) -- cgit 1.4.1