From 26eacd72683769a8fce046b10589ee9d278b5df9 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Mon, 24 Feb 2003 11:45:43 +0000 Subject: [PATCH] * src/code/macros.lisp (dolist): Add original declaration to the form evaluating the result form, for the case where VAR is declared special. --- code/macros.lisp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/macros.lisp b/code/macros.lisp index 4b021172b..8103d1f90 100644 --- a/code/macros.lisp +++ b/code/macros.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.88 2003/02/18 16:55:49 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.89 2003/02/24 11:45:43 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1568,12 +1568,13 @@ (parse-body body nil nil) (let ((n-list (gensym))) `(do* ((,n-list ,list (cdr ,n-list))) - ((endp ,n-list) - ,@(if result - `((let ((,var nil)) - ,var - ,result)) - '(nil))) + ((endp ,n-list) + ,@(if (constantp result) + `(,result) + `((let ((,var nil)) + ,@decls + ,var + ,result)))) (let ((,var (car ,n-list))) ,@decls (tagbody -- GitLab