X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdestructuring-bind.lisp;h=e2d699d817f2cdda64103a4bd7f12eac8063599a;hb=7e24349c17298e2959e853ea411b5f65d9f7f332;hp=7e9b8e1402bb78e5d1a5ffa0793e12dffb4b9909;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/destructuring-bind.lisp b/src/code/destructuring-bind.lisp index 7e9b8e1..e2d699d 100644 --- a/src/code/destructuring-bind.lisp +++ b/src/code/destructuring-bind.lisp @@ -9,14 +9,16 @@ (in-package "SB!IMPL") -(defmacro-mundanely destructuring-bind (lambda-list arg-list &rest body) +(defmacro-mundanely destructuring-bind (lambda-list expression &body body) #!+sb-doc - "Bind the variables in LAMBDA-LIST to the contents of ARG-LIST." - (let* ((arg-list-name (gensym "ARG-LIST-"))) + "Bind the variables in LAMBDA-LIST to the corresponding values in the +tree structure resulting from the evaluation of EXPRESSION." + (let ((whole-name (gensym "WHOLE"))) (multiple-value-bind (body local-decls) - (parse-defmacro lambda-list arg-list-name body nil 'destructuring-bind - :anonymousp t - :doc-string-allowed nil) - `(let ((,arg-list-name ,arg-list)) - ,@local-decls - ,body)))) + (parse-defmacro lambda-list whole-name body nil 'destructuring-bind + :anonymousp t + :doc-string-allowed nil + :wrap-block nil) + `(let ((,whole-name ,expression)) + ,@local-decls + ,body))))