diff options
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1989,7 +1989,8 @@ SUSPEND: Suspend note, 0 for unsuspend, 1 for suspend" (cl-assert (and (listp tags) (cl-every #'stringp tags)) nil "Tags must be a list of strings") (cl-assert (and (listp gnosis) (length= gnosis 3) (cl-every #'floatp gnosis)) nil "gnosis must be a list of 3 floats") - (cl-assert (or (stringp options) (and (listp options) (cl-every #'stringp options))) + (cl-assert (or (stringp options) (and (listp options) (cl-every #'(lambda (x) (or (stringp x) (null x))) + options))) nil "Options must be a string or a list of strings") (cl-assert (and (numberp suspend) (or (= suspend 0) (= suspend 1))) nil "Suspend must be either 0 or 1") (when (and (string= (gnosis-get-type id) "cloze") @@ -2030,14 +2031,14 @@ SUSPEND: Suspend note, 0 for unsuspend, 1 for suspend" (memq (nth 0 entry) '(:deck :tag)) (stringp (nth 1 entry)) (listp (nth 2 entry))) ; Ensure the third element is a plist - (error "Each entry should a :deck or :tag keyword, a string, and a plist of custom values")) + (error "Each entry should a have :deck or :tag keyword, a string, and a plist of custom values")) (let ((proto (plist-get (nth 2 entry) :proto)) (anagnosis (plist-get (nth 2 entry) :anagnosis)) (epignosis (plist-get (nth 2 entry) :epignosis)) (agnoia (plist-get (nth 2 entry) :agnoia)) (amnesia (plist-get (nth 2 entry) :amnesia)) (lethe (plist-get (nth 2 entry) :lethe))) - (unless (listp proto) + (unless (and (listp proto) (cl-every #'integerp proto)) (error "Proto must be a list of interval integer values")) (unless (or (null anagnosis) (integerp anagnosis)) (error "Anagnosis should be an integer")) |