diff options
author | Thanos Apollo <[email protected]> | 2023-12-27 10:57:17 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-27 10:57:17 +0200 |
commit | 9f81a472ef13df058e7bf3408c23b97a9a4941d7 (patch) | |
tree | 09a50f8262759d2d55e10603fa7a95e01b030df1 | |
parent | a89ce96105349bba7de0bf71897d93b76dc5209d (diff) |
Add gnosis-display--basic-answer
-rw-r--r-- | gnosis.el | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |