*** empty log message ***
authorRoland McGrath <roland@gnu.org>
Thu, 26 Sep 1991 06:39:56 +0000 (06:39 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 26 Sep 1991 06:39:56 +0000 (06:39 +0000)
lisp/map-ynp.el

index 0d78ee6..db345d6 100644 (file)
@@ -69,23 +69,25 @@ Returns the number of actions taken."
        (actions 0)
        prompt
        char
+       elt
        (next (if (or (symbolp list)
                      (subrp list)
                      (compiled-function-p list)
                      (and (consp list)
                           (eq (car list) 'lambda)))
-                 list
+                 (function (lambda ()
+                             (setq elt (funcall list))))
                (function (lambda ()
                            (if list
-                               (prog1
-                                   (car list)
-                                 (setq list (cdr list)))
-                             nil)))))
-       elt)
+                               (progn
+                                 (setq elt (car list)
+                                       list (cdr list))
+                                 t)
+                             nil))))))
     (if (stringp prompter)
        (setq prompter (` (lambda (object)
                            (format (, prompter) object)))))
-    (while (setq elt (funcall next))
+    (while (funcall next)
       (setq prompt (funcall prompter elt))
       (if (stringp prompt)
          (progn