From c5c0320e24929309b17103cbea93e16acaefa894 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 19 Jan 2024 00:34:03 +0200 Subject: gnosis-review--session: Refactor using read-multiple-choice --- gnosis.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gnosis.el b/gnosis.el index 26e8cdd..6662d1c 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1034,13 +1034,18 @@ NOTE-NUM: The number of notes reviewed in the session." (cl-loop for note in notes do (gnosis-review-note note) (setf note-count (1+ note-count)) - (pcase (read-char-choice "Note Action: [n]ext, [s]uspend, [e]dit, [q]uit: " '(?n ?s ?e ?q)) + (pcase (car (read-multiple-choice + "Note actions" + '((?n "next") + (?s "suspend") + (?e "edit") + (?q "quit")))) (?n nil) (?s (gnosis-suspend-note note)) - (?e (progn (gnosis-edit-note note) - (recursive-edit))) - (?q (progn (gnosis-review-commit note-count) - (cl-return)))) + (?e (gnosis-edit-note note) + (recursive-edit)) + (?q (gnosis-review-commit note-count) + (cl-return))) finally (gnosis-review-commit note-count)))))) -- cgit v1.2.3