X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fdefbangmacro.lisp;h=723a04e609f55752729212cf1a4f782a95de9b01;hb=da5a7ccd58c2bf3c5287a11fb41e01403e5745e8;hp=c2435523646a0b76a7f27faed621e579ed0accce;hpb=02ce4b1b927f1312c300047bd5a0db6663a1d2c6;p=sbcl.git diff --git a/src/code/defbangmacro.lisp b/src/code/defbangmacro.lisp index c243552..723a04e 100644 --- a/src/code/defbangmacro.lisp +++ b/src/code/defbangmacro.lisp @@ -22,7 +22,7 @@ ;; a description of the DEF!MACRO call to be stored until we get enough ;; of the system running to finish processing it (defstruct delayed-def!macro - (args (required-argument) :type cons) + (args (missing-arg) :type cons) (package (sane-package) :type package)) ;; a list of DELAYED-DEF!MACROs stored until we get DEF!MACRO working fully ;; so that we can apply it to them. After DEF!MACRO is made to work, this @@ -38,12 +38,12 @@ (defmacro def!macro (name &rest rest) #-(or sb-xc-host sb-xc) `(defmacro ,name ,@rest) #+sb-xc-host `(progn - (defmacro ,name ,@rest) - ,(let ((uncrossed-args `(,(uncross name) ,@rest))) - (if (boundp '*delayed-def!macros*) - `(push (make-delayed-def!macro :args ',uncrossed-args) - *delayed-def!macros*) - `(sb!xc:defmacro ,@uncrossed-args)))) + (defmacro ,name ,@rest) + ,(let ((uncrossed-args `(,(uncross name) ,@rest))) + (if (boundp '*delayed-def!macros*) + `(push (make-delayed-def!macro :args ',uncrossed-args) + *delayed-def!macros*) + `(sb!xc:defmacro ,@uncrossed-args)))) ;; When cross-compiling, we don't want the DEF!MACRO to have any ;; effect at compile time, because (1) we already defined the macro ;; when building the cross-compiler, so at best it would be redundant @@ -62,9 +62,9 @@ (if (boundp '*delayed-def!macros*) (progn (mapcar (lambda (x) - (let ((*package* (delayed-def!macro-package x))) - (eval `(sb!xc:defmacro ,@(delayed-def!macro-args x))))) - (reverse *delayed-def!macros*)) + (let ((*package* (delayed-def!macro-package x))) + (eval `(sb!xc:defmacro ,@(delayed-def!macro-args x))))) + (reverse *delayed-def!macros*)) ;; We shouldn't need this list any more. Making it unbound serves as a ;; signal to DEF!MACRO that it needn't delayed DEF!MACROs any more. ;; It is also generally a good thing for other reasons: it frees