summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-15 09:23:30 +0200
committerThanos Apollo <[email protected]>2023-12-15 09:23:30 +0200
commit811e6186555e26d933e5c43bbe017adcade0f95e (patch)
tree6fcf575b1f49c3a88e96b61c5d769b1e35f4c2c2 /gnosis.el
parentc22409d05c32bee7a4376d4d3cecab798d74b282 (diff)
Revert changes on gnosis--ask-input
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el20
1 files changed, 9 insertions, 11 deletions
diff --git a/gnosis.el b/gnosis.el
index 451eeca..bb95ff0 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -107,17 +107,15 @@ Example:
(defun gnosis--ask-input (prompt)
"PROMPT user for input until `q' is given.
-
- The user is prompted to provide input for the 'PROMPT' message, and
- the returns the list of inputs in reverse order."
- (let ((input-list nil)
- (input ""))
- (while (not (string= input "q"))
- (setq input (read-string (concat prompt " (q for quit): ")))
- (push input input-list))
- (when (string= (car input-list) "q")
- (pop input-list))
- (nreverse input-list)))
+
+The user is prompted to provide input for the 'PROMPT' message, and
+the returns the list of inputs in reverse order."
+ (let ((input nil))
+ (while (not (equal (car input) "q"))
+ (push (read-string (concat prompt " (q for quit): ")) input))
+ (when (equal (car input) "q")
+ (pop input))
+ (reverse input)))
(defun gnosis-add-deck (name)
"Create deck with NAME."