summaryrefslogtreecommitdiff
path: root/lisp/map-ynp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-03-09 21:17:46 +0000
committerRichard M. Stallman <rms@gnu.org>1993-03-09 21:17:46 +0000
commit3b23972cc36a551987f3efe1f734a0da0b55e036 (patch)
treecbfbf62faaecb9832d016d24133c9dbb7bc69543 /lisp/map-ynp.el
parent00a1d6af9b85e711e17d0fd9d7506b214b05fa74 (diff)
downloademacs-3b23972cc36a551987f3efe1f734a0da0b55e036.tar.gz
(map-y-or-n-p): Handle `quit' as answer.
Diffstat (limited to 'lisp/map-ynp.el')
-rw-r--r--lisp/map-ynp.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el
index e79e47fa664..c3cce3abc07 100644
--- a/lisp/map-ynp.el
+++ b/lisp/map-ynp.el
@@ -111,6 +111,7 @@ Returns the number of actions taken."
(setq prompt (funcall prompter elt))
(if (stringp prompt)
(progn
+ (setq quit-flag nil)
;; Prompt the user about this object.
(let ((cursor-in-echo-area t))
(message "%s(y, n, !, ., q, %sor %s) "
@@ -132,6 +133,11 @@ Returns the number of actions taken."
(funcall actor elt)
(setq actions (1+ actions)
next (function (lambda () nil))))
+ ((eq def 'quit)
+ (setq quit-flag t)
+ (setq next (` (lambda ()
+ (setq next '(, next))
+ '(, elt)))))
((eq def 'automatic)
;; Act on this and all following objects.
(if (eval (funcall prompter elt))