diff options
author | Thanos Apollo <[email protected]> | 2024-07-05 09:15:31 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-07-05 09:15:31 +0300 |
commit | fc61cc38230e0f87b9e1913c2cf84d3ec2038517 (patch) | |
tree | ff99a6512176a9eba98e7f00006a76ab7192d42f | |
parent | c2bd634d455b06ce38f1cf04a60609c047aa47c4 (diff) |
Add gnosis-validate-actions-keys
Verify gnosis-review-actions-keys have valid values
-rw-r--r-- | gnosis.el | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1571,6 +1571,13 @@ be called with new SUCCESS value plus NOTE & NOTE-COUNT." (gnosis-display-next-review note success) (gnosis-review-actions success note note-count)) +(defun gnosis-validate-actions-keys () + "Ensure all actions in `gnosis-review-actions-keys` are valid." + (let ((valid-actions '("next" "override" "suspend" "edit" "quit"))) + (dolist (entry gnosis-review-keybindings) + (cl-assert (member (cdr entry) valid-actions) nil + "Invalid action: %s" (cdr entry))))) + (defun gnosis-review-actions (success note note-count) "Specify action during review of note. @@ -1579,6 +1586,7 @@ NOTE: Note ID NOTE-COUNT: Total notes reviewed To customize the keybindings, adjust `gnosis-review-keybindings'." + (gnosis-validate-actions-keys) (let* ((choices (mapcar (lambda (pair) (list (car pair) (cdr pair))) gnosis-review-keybindings)) |