SETF-MACRO-EXPANSIONDEFSETF and DEFINE-SETF-METHOD can be used with a function or a macro, while page 97 says that SETF expands macros before it looks for setf-methods.
This is Symbolics issue #9.
SETF (actually GET-SETF-METHOD-MULTIPLE-VALUE) only expands macros after exhausting all other possibilities other than expanding into a call to a function named (SETF reader). Clarify that it expands macros in the style of MACROEXPAND-1 rather than MACROEXPAND (this was point 11 of FUNCTION-NAME:LARGE and is repeated here for clarity only).(defmacro foo (x y) `(aref ,x ,y))
(defun (setf foo) (z x y) ;wrong (push `(,x ,y ,z) *foo-trace*) (setf (aref x y) z))
(defsetf foo (x y) (z) ;right `(progn (push `(,,x ,,y ,,z) *foo-trace*) (setf (aref ,x ,y) ,z)))
(macroexpand-1 '(setf (foo array i) (val)))
The last form should include a push onto *foo-trace*, rather than first macroexpanding (foo array i) into (aref array i) and then setf'ing that.
The defun form has no effect because SETF expands macros before expanding into a call to such a function, so this function will not be used.
The rationale for FUNCTION-NAME:LARGE point 11 suggests that we thought we had exchanged the two bullets on page 97, so that SETF looks for setf methods before it expands macros. However there doesn't seem to be any cleanup issue that explicitly addresses this.