Commit 81eb8fcd authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(map-y-or-n-p): Handle `quit' as answer.

parent 0a2eb25e
...@@ -111,6 +111,7 @@ Returns the number of actions taken." ...@@ -111,6 +111,7 @@ Returns the number of actions taken."
(setq prompt (funcall prompter elt)) (setq prompt (funcall prompter elt))
(if (stringp prompt) (if (stringp prompt)
(progn (progn
(setq quit-flag nil)
;; Prompt the user about this object. ;; Prompt the user about this object.
(let ((cursor-in-echo-area t)) (let ((cursor-in-echo-area t))
(message "%s(y, n, !, ., q, %sor %s) " (message "%s(y, n, !, ., q, %sor %s) "
...@@ -132,6 +133,11 @@ Returns the number of actions taken." ...@@ -132,6 +133,11 @@ Returns the number of actions taken."
(funcall actor elt) (funcall actor elt)
(setq actions (1+ actions) (setq actions (1+ actions)
next (function (lambda () nil)))) next (function (lambda () nil))))
((eq def 'quit)
(setq quit-flag t)
(setq next (` (lambda ()
(setq next '(, next))
'(, elt)))))
((eq def 'automatic) ((eq def 'automatic)
;; Act on this and all following objects. ;; Act on this and all following objects.
(if (eval (funcall prompter elt)) (if (eval (funcall prompter elt))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment