Skip to content
Snippets Groups Projects
Commit e3ce2d13 authored by toy's avatar toy
Browse files

MULTIPLE-VALUE-SETQ was mishandling variables that were symbol

macros.  Use the version from SBCL.
parent 08f38af9
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.80 2002/11/20 16:15:39 toy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.81 2002/11/20 20:01:25 toy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -496,15 +496,9 @@ ...@@ -496,15 +496,9 @@
;;; All the multiple-value receiving forms are defined in terms of ;;; All the multiple-value receiving forms are defined in terms of
;;; Multiple-Value-Call. ;;; Multiple-Value-Call.
;;; ;;;
(defmacro multiple-value-setq (varlist value-form) (defmacro multiple-value-setq (vars value-form)
(unless (and (listp varlist) (every #'symbolp varlist)) `(values (setf (values ,@vars) ,value-form)))
(error "Varlist is not a list of symbols: ~S." varlist))
(let ((temps (mapcar #'(lambda (x) (declare (ignore x)) (gensym)) varlist)))
`(multiple-value-bind ,temps ,value-form
,@(mapcar #'(lambda (var temp)
`(setq ,var ,temp))
varlist temps)
,(car temps))))
;;; ;;;
(defmacro multiple-value-bind (varlist value-form &body body) (defmacro multiple-value-bind (varlist value-form &body body)
(unless (and (listp varlist) (every #'symbolp varlist)) (unless (and (listp varlist) (every #'symbolp varlist))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment