X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fmacros.lisp;h=f9f2bd391c81fcb8af558d88b4e67110856ae5b0;hb=64ed946d513d0cd0508fea90cd3b44328e75df9a;hp=838d6999cdf757c3c8ddda1d4d7df2a165904d9e;hpb=cc32d78e47dfcad7634e26e69797094ed683a888;p=sbcl.git diff --git a/src/code/macros.lisp b/src/code/macros.lisp index 838d699..f9f2bd3 100644 --- a/src/code/macros.lisp +++ b/src/code/macros.lisp @@ -99,18 +99,19 @@ invoked. In that case it will store into PLACE and start over." (:symbol name "defining ~A as a symbol-macro")) (sb!c:with-source-location (source-location) (setf (info :source-location :symbol-macro name) source-location)) - (ecase (info :variable :kind name) - ((:macro :global nil) - (setf (info :variable :kind name) :macro) - (setf (info :variable :macro-expansion name) expansion)) - (:special - (error 'simple-program-error - :format-control "Symbol macro name already declared special: ~S." - :format-arguments (list name))) - (:constant - (error 'simple-program-error - :format-control "Symbol macro name already declared constant: ~S." - :format-arguments (list name)))) + (let ((kind (info :variable :kind name))) + (ecase kind + ((:macro :unknown) + (setf (info :variable :kind name) :macro) + (setf (info :variable :macro-expansion name) expansion)) + ((:special :global) + (error 'simple-program-error + :format-control "Symbol macro name already declared ~A: ~S." + :format-arguments (list kind name))) + (:constant + (error 'simple-program-error + :format-control "Symbol macro name already defined as a constant: ~S." + :format-arguments (list name))))) name) ;;;; DEFINE-COMPILER-MACRO @@ -452,13 +453,8 @@ invoked. In that case it will store into PLACE and start over." ;; optional dispatch mechanism for the M-V-B gets increasingly ;; hairy. (if (integerp n) - (let ((dummy-list nil) - (keeper (gensym "KEEPER-"))) - ;; We build DUMMY-LIST, a list of variables to bind to useless - ;; values, then we explicitly IGNORE those bindings and return - ;; KEEPER, the only thing we're really interested in right now. - (dotimes (i n) - (push (gensym "IGNORE-") dummy-list)) + (let ((dummy-list (make-gensym-list n)) + (keeper (sb!xc:gensym "KEEPER"))) `(multiple-value-bind (,@dummy-list ,keeper) ,form (declare (ignore ,@dummy-list)) ,keeper))