changeset 415:ba116e58de49

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Thu, 26 Sep 1991 06:39:56 +0000
parents 4c9349866dac
children 954d6271f0e9
files lisp/map-ynp.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/map-ynp.el	Thu Sep 26 06:39:41 1991 +0000
+++ b/lisp/map-ynp.el	Thu Sep 26 06:39:56 1991 +0000
@@ -69,23 +69,25 @@
 	(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