X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Finfo-functions.lisp;h=b63a4a58ec9c187ba0f5cd1c0ae911af94713fe5;hb=e67cc0f952040723f7d0f37ddb88fe895f4b1464;hp=5188227ce8c2421834ccc5f37db2da0752740def;hpb=ff92598854bf7cae8d57fe49cef4d9a98e1ab345;p=sbcl.git diff --git a/src/compiler/info-functions.lisp b/src/compiler/info-functions.lisp index 5188227..b63a4a5 100644 --- a/src/compiler/info-functions.lisp +++ b/src/compiler/info-functions.lisp @@ -154,7 +154,7 @@ (let* ((fenv (when env (sb!c::lexenv-funs env))) (local-def (cdr (assoc symbol fenv)))) (cond (local-def - (if (and (consp local-def) (eq (car local-def) 'MACRO)) + (if (and (consp local-def) (eq (car local-def) 'macro)) (cdr local-def) nil)) ((eq (info :function :kind symbol) :macro) @@ -162,14 +162,16 @@ (t nil)))) -;;; Note: Technically there could be an ENV optional argument to SETF -;;; MACRO-FUNCTION, but since ANSI says that the consequences of -;;; supplying that optional argument are undefined, we don't allow it. -;;; (Thus our implementation of this unspecified behavior is to -;;; complain that the wrong number of arguments was supplied. Since -;;; the behavior is unspecified, this is conforming.:-) -(defun (setf sb!xc:macro-function) (function symbol) +(defun (setf sb!xc:macro-function) (function symbol &optional environment) (declare (symbol symbol) (type function function)) + (when environment + ;; Note: Technically there could be an ENV optional argument to SETF + ;; MACRO-FUNCTION, but since ANSI says that the consequences of + ;; supplying a non-nil one are undefined, we don't allow it. + ;; (Thus our implementation of this unspecified behavior is to + ;; complain. SInce the behavior is unspecified, this is conforming.:-) + (error "Non-NIL environment argument in SETF of MACRO-FUNCTION ~S: ~S" + symbol environment)) (when (eq (info :function :kind symbol) :special-form) (error "~S names a special form." symbol)) (setf (info :function :kind symbol) :macro)