summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnosis.el b/gnosis.el
index 6c9e88d..90a2f3c 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -331,9 +331,11 @@ Example:
"From TABLE use where to delete VALUE."
(emacsql gnosis-db `[:delete :from ,table :where ,value]))
-(defun gnosis-delete-note (id)
- "Delete note with ID."
- (when (y-or-n-p "Delete note?")
+(defun gnosis-delete-note (id &optional verification)
+ "Delete note with ID.
+
+When VERIFICATION is non-nil, skip `y-or-n-p' prompt."
+ (when (or verification (y-or-n-p "Delete note?"))
(emacsql-with-transaction gnosis-db (gnosis--delete 'notes `(= id ,id)))))
(defun gnosis-delete-deck (&optional id)