[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

get-setf-method takes optional environment argument



I think we all agree (at least we seemed to last September or so) that
get-setf-method needs to tkae an optional environment argument in order
to correctly expand things.  For example
	(defmacro foo (a b) `(aref ,a ,b))

	(setf (ldb (byte 2 2) (foo (x) (y))) (z))

	  == (setf (ldb (byte 2 2) (aref (x) (y))) (z))

but, given the above defmacro is still the global definition

	(macrolet ((foo (a b) `(aref ,a 2 ,b)))	; added a 2 in the middle
	  (setf (ldb (byte 2 2) (foo (x) (y))) (z)))
should be
	 == (setf (ldb (byte 2 2) (aref (x) 2 (y))) (z)) 

but given the descipiption in CLtL it has no way to see the macrolet'd
definition of FOO, and will therefore expand incorrectly.

Did we also decide DEFINE-SETF-METHOD needs to allow an &ENVIRONMENT
argument to be able to effect this?
xo