summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Weaver <cashweaver@google.com>2022-09-16 10:10:33 -0700
committerCash Weaver <cashweaver@google.com>2022-09-16 10:10:33 -0700
commit942282cb508d281e858f0df82f48f1d5e5b9ff80 (patch)
tree3d81dd85f05bba2d41d319d8afbd71bce2d4902d
parentf64b5336485a42be91cfe77850c02a41575f5984 (diff)
feat: Make hint prefix ("...") customizable
1. Add `org-fc-type-cloze-hint-prefix`
-rw-r--r--org-fc-type-cloze.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/org-fc-type-cloze.el b/org-fc-type-cloze.el
index 78b76ee..9a1ef04 100644
--- a/org-fc-type-cloze.el
+++ b/org-fc-type-cloze.el
@@ -41,6 +41,11 @@
"Face for org-fc cloze card holes."
:group 'org-fc)
+(defcustom org-fc-type-cloze-hint-prefix
+ "..."
+ "Prefix for cloze hints."
+ :group 'org-fc)
+
(defvar org-fc-type-cloze-types
'(deletion enumeration context single)
"List of valid cloze card subtypes.")
@@ -129,7 +134,9 @@ CURRENT-INDEX is the index of the current position in the list of all holes."
(setq org-fc-type-cloze--hint
(org-fc-overlay-surround
(org-fc-make-overlay hint-beg hint-end)
- "[..." "]" 'org-fc-type-cloze-hole-face))
+ (concat "[" org-fc-type-cloze-hint-prefix)
+ "]"
+ 'org-fc-type-cloze-hole-face))
(org-fc-hide-region hint-end hole-end "")
(org-fc-make-overlay
hole-beg hole-end