summaryrefslogtreecommitdiff
path: root/lisp/map-ynp.el
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1991-07-09 16:28:08 +0000
committerRoland McGrath <roland@gnu.org>1991-07-09 16:28:08 +0000
commit648f57b02d580e96cf9762b60dd0b2695aa290eb (patch)
treedd1cb052fe6d684de9283fc360a68dd8c485a4b4 /lisp/map-ynp.el
parent1cbaac7611e3edf3c282a4fac201613774f425c3 (diff)
downloademacs-648f57b02d580e96cf9762b60dd0b2695aa290eb.tar.gz
*** empty log message ***
Diffstat (limited to 'lisp/map-ynp.el')
-rw-r--r--lisp/map-ynp.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el
index f55d6e62713..270e137c521 100644
--- a/lisp/map-ynp.el
+++ b/lisp/map-ynp.el
@@ -115,31 +115,34 @@ Returns the number of actions taken."
(setq actions (1+ actions)
next (function (lambda () nil))))
((= ?! char)
- ;; Act on all following objects.
+ ;; Act on this and all following objects.
+ (if (eval (funcall prompter elt))
+ (progn
+ (funcall actor elt)
+ (setq actions (1+ actions))))
(while (setq elt (funcall next))
- (if (funcall prompter elt)
+ (if (eval (funcall prompter elt))
(progn
(funcall actor elt)
(setq actions (1+ actions))))))
((= ?? char)
(setq unread-command-char help-char)
- (setq next (` (function (lambda ()
- (setq next (, next))
- t)))))
+ (setq next (` (lambda ()
+ (setq next '(, next))
+ '(, elt)))))
(t
;; Random char.
(message "Type %s for help."
(key-description (char-to-string help-char)))
(beep)
(sit-for 1)
- (setq next (` (function (lambda ()
- (setq next (, next))
- t)))))))
+ (setq next (` (lambda ()
+ (setq next '(, next))
+ '(, elt)))))))
(if (eval prompt)
(progn
- (funcall actor (car list))
- (setq actions (1+ actions)))))
- (setq list (cdr list)))
+ (funcall actor elt)
+ (setq actions (1+ actions))))))
;; Clear the last prompt from the minibuffer.
(message "")
;; Return the number of actions that were taken.