diff options
| author | Phillip Lord <phillip.lord@russet.org.uk> | 2019-06-22 12:29:37 +0100 |
|---|---|---|
| committer | Phillip Lord <phillip.lord@russet.org.uk> | 2019-06-22 12:29:37 +0100 |
| commit | a949ece7244b1a4557e53f546450ee98a35de520 (patch) | |
| tree | c61d425162c3e79101cb12fccba84065a9b61ffe | |
| parent | 6533b732469dd4a8014e9e3ffb29625947d387ed (diff) | |
| download | org-drill-a949ece7244b1a4557e53f546450ee98a35de520.tar.gz org-drill-a949ece7244b1a4557e53f546450ee98a35de520.zip | |
Remove more dynamic scoping errors
| -rw-r--r-- | org-drill.el | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/org-drill.el b/org-drill.el index 162b4fc..fc881e4 100644 --- a/org-drill.el +++ b/org-drill.el @@ -3590,7 +3590,7 @@ returns its return value." (let ((spelln-language lang)) (spelln-integer-in-words n))) -(defun org-drill-present-translate-number (session) +(defun org-drill-present-translate-number (_session) (let ((num-min (read (org-entry-get (point) "DRILL_NUMBER_MIN"))) (num-max (read (org-entry-get (point) "DRILL_NUMBER_MAX"))) (language (read (org-entry-get (point) "DRILL_LANGUAGE" t))) @@ -3659,45 +3659,55 @@ returns its return value." (defun org-drill-present-spanish-verb (session) - (let ((prompt nil) - (reveal-headings nil)) + (let ((prompt nil)) (with-hidden-comments (with-hidden-cloze-hints (with-hidden-cloze-text (cl-case (cl-random 6) + ;; PWL 2018-06-22 + ;; As far as I can tell, neither prompt nor reveal-headings + ;; do anything here. They never seem to appear anyway. But + ;; this might be because I broke things when cleaning up the + ;; dynamic binding. (0 (org-drill-hide-all-subheadings-except '("Infinitive")) (setq prompt (concat "Translate this Spanish verb, and conjugate it " "for the *present* tense.") - reveal-headings '("English" "Present Tense" "Notes"))) + ;;reveal-headings '("English" "Present Tense" "Notes") + )) (1 (org-drill-hide-all-subheadings-except '("English")) (setq prompt (concat "For the *present* tense, conjugate the " "Spanish translation of this English verb.") - reveal-headings '("Infinitive" "Present Tense" "Notes"))) + ;;reveal-headings '("Infinitive" "Present Tense" "Notes") + )) (2 (org-drill-hide-all-subheadings-except '("Infinitive")) (setq prompt (concat "Translate this Spanish verb, and " "conjugate it for the *past* tense.") - reveal-headings '("English" "Past Tense" "Notes"))) + ;;reveal-headings '("English" "Past Tense" "Notes") + )) (3 (org-drill-hide-all-subheadings-except '("English")) (setq prompt (concat "For the *past* tense, conjugate the " "Spanish translation of this English verb.") - reveal-headings '("Infinitive" "Past Tense" "Notes"))) + ;;reveal-headings '("Infinitive" "Past Tense" "Notes") + )) (4 (org-drill-hide-all-subheadings-except '("Infinitive")) (setq prompt (concat "Translate this Spanish verb, and " "conjugate it for the *future perfect* tense.") - reveal-headings '("English" "Future Perfect Tense" "Notes"))) + ;;reveal-headings '("English" "Future Perfect Tense" "Notes") + )) (5 (org-drill-hide-all-subheadings-except '("English")) (setq prompt (concat "For the *future perfect* tense, conjugate the " "Spanish translation of this English verb.") - reveal-headings '("Infinitive" "Future Perfect Tense" "Notes")))) + ;;reveal-headings '("Infinitive" "Future Perfect Tense" "Notes") + ))) (org-cycle-hide-drawers 'all) - (prog1 (org-drill-presentation-prompt session) + (prog1 (org-drill-presentation-prompt session prompt) (org-drill-hide-subheadings-if 'org-drill-entry-p))))))) |
