From 43f231c22a05f2f4acd0b84872859f1771688392 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 12 Dec 2023 18:21:55 +0200 Subject: Rename gnosis--get to gnosis--get-id --- gnosis.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnosis.el') diff --git a/gnosis.el b/gnosis.el index f60bf09..765e742 100644 --- a/gnosis.el +++ b/gnosis.el @@ -59,13 +59,13 @@ "Insert VALUES to TABLE-NAME." (emacsql gnosis-db `[:insert :into ,table-name :values ,values])) -(defun gnosis--get (table value id) +(defun gnosis--get-id (table value id) "Get VALUE for question ID from TABLE." (caar (gnosis--select table value `(= id ,id)))) (defun gnosis--display-question (id) "Display main row for question ID." - (let ((question (gnosis--get 'notes 'main id))) + (let ((question (gnosist--get-id 'notes 'main id))) ;; Animate.el is used only for testing purposes. (animate-string question 5))) @@ -117,14 +117,14 @@ use it like this: (defun gnosis-mcq-answer (id) "Choose the correct answer, from mcq choices for question ID." - (let ((choices (gnosis--get 'notes 'options id)) + (let ((choices (gnosist--get-id 'notes 'options id)) (history-add-new-input nil)) ;; Disable history (completing-read "Answer: " choices))) (defun gnosis-review-mcq-choices (id) "Display multiple choice answers for question ID." - (let ((canswer (gnosis--get 'notes 'answer id)) - (choices (gnosis--get 'notes 'options id)) + (let ((canswer (gnosist--get-id 'notes 'answer id)) + (choices (gnosist--get-id 'notes 'options id)) (user-choice (gnosis-mcq-answer id))) (if (equal (nth (- canswer 1) choices) user-choice) (message "Correct!") @@ -132,7 +132,7 @@ use it like this: (defun gnosis-review (id) "Start review for question ID." - (let ((type (gnosis--get 'notes 'type id))) + (let ((type (gnosist--get-id 'notes 'type id))) (pcase type ("mcq" (gnosis-review-mcq-choices id)) ("basic" (message "Not Ready yet.")) -- cgit v1.2.3