X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Finfo-functions.lisp;h=7568f1274813a8d1da576783f2165d0e7429f47c;hb=b63c4fb9b98fa8188e17ba926e150ba417a74635;hp=5188227ce8c2421834ccc5f37db2da0752740def;hpb=ff92598854bf7cae8d57fe49cef4d9a98e1ab345;p=sbcl.git diff --git a/src/compiler/info-functions.lisp b/src/compiler/info-functions.lisp index 5188227..7568f12 100644 --- a/src/compiler/info-functions.lisp +++ b/src/compiler/info-functions.lisp @@ -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)