Mercurial > emacs
comparison lisp/map-ynp.el @ 415:ba116e58de49
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Thu, 26 Sep 1991 06:39:56 +0000 |
parents | 66f3891c43fd |
children | c3bbd755b7da |
comparison
equal
deleted
inserted
replaced
414:4c9349866dac | 415:ba116e58de49 |
---|---|
67 (help-form (cons 'map-y-or-n-p-help | 67 (help-form (cons 'map-y-or-n-p-help |
68 (or help '("object" "objects" "act on")))) | 68 (or help '("object" "objects" "act on")))) |
69 (actions 0) | 69 (actions 0) |
70 prompt | 70 prompt |
71 char | 71 char |
72 elt | |
72 (next (if (or (symbolp list) | 73 (next (if (or (symbolp list) |
73 (subrp list) | 74 (subrp list) |
74 (compiled-function-p list) | 75 (compiled-function-p list) |
75 (and (consp list) | 76 (and (consp list) |
76 (eq (car list) 'lambda))) | 77 (eq (car list) 'lambda))) |
77 list | 78 (function (lambda () |
79 (setq elt (funcall list)))) | |
78 (function (lambda () | 80 (function (lambda () |
79 (if list | 81 (if list |
80 (prog1 | 82 (progn |
81 (car list) | 83 (setq elt (car list) |
82 (setq list (cdr list))) | 84 list (cdr list)) |
83 nil))))) | 85 t) |
84 elt) | 86 nil)))))) |
85 (if (stringp prompter) | 87 (if (stringp prompter) |
86 (setq prompter (` (lambda (object) | 88 (setq prompter (` (lambda (object) |
87 (format (, prompter) object))))) | 89 (format (, prompter) object))))) |
88 (while (setq elt (funcall next)) | 90 (while (funcall next) |
89 (setq prompt (funcall prompter elt)) | 91 (setq prompt (funcall prompter elt)) |
90 (if (stringp prompt) | 92 (if (stringp prompt) |
91 (progn | 93 (progn |
92 ;; Prompt the user about this object. | 94 ;; Prompt the user about this object. |
93 (let ((cursor-in-echo-area t)) | 95 (let ((cursor-in-echo-area t)) |