X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdestructuring-bind.lisp;h=4ea6b48f7c2f12ebef816a28ff8d681642bef2f9;hb=25fe91bf63fd473d9316675b0e0ca9be0079e9eb;hp=a3b755052ba457767dadbf9100adf382ce8436a8;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/destructuring-bind.lisp b/src/code/destructuring-bind.lisp index a3b7550..4ea6b48 100644 --- a/src/code/destructuring-bind.lisp +++ b/src/code/destructuring-bind.lisp @@ -9,17 +9,16 @@ (in-package "SB!IMPL") -(file-comment - "$Header$") - -(defmacro-mundanely destructuring-bind (lambda-list arg-list &rest body) +(defmacro-mundanely destructuring-bind (lambda-list expression &rest 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))))