summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index cc50a82..f954d29 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -113,6 +113,18 @@ Example:
(fill-paragraph (insert
(gnosis-cloze-replace-words sentence clozes gnosis-cloze-char)))))
+(defun gnosis-display--basic-answer (answer success)
+ "Display ANSWER.
+
+Depending on the value of SUCCESS, display it using different faces.
+If success t, use `gnsois-face-correct'
+else use `gnosis-face-false'"
+ (with-gnosis-buffer
+ (insert
+ (concat "\n\nAnswer: " (propertize answer 'face (if success
+ 'gnosis-face-correct
+ 'gnosis-face-false))))))
+
(defun gnosis-display--cloze-correct (cloze-chars correct)
"Replace CLOZE-CHARS with CORRECT."
(with-gnosis-buffer