Re: Querying SETF expansions
Maybe CL:GET-SETF-EXPANSION? The fourth value is either the result of expanding the expression or '(setf foo). CL-USER 17 : 1 > (get-setf-expansion '(car x)) (#:G239852) (X) (#:G239851) (SYSTEM::%RPLACA #:G239852 #:G239851) (CAR #:G239852) CL-USER 18 : 1 > (get-setf-expansion '(foo x)) (#:G239854) (X) (#:G239853) (SETF::\"COMMON-LISP-USER\"\ \"FOO\" #:G239853 #:G239854) (FOO #:G239854) CL-USER 19 : 1 > (fboundp '(setf foo)) NIL HTH, Bill On 8/4/06, Edi Weitz <edi@agharta.de> wrote: > If I have defined a SETF /function/ like > > (defun (setf foo) (new-value ...) ...), > > then I can check for this function with > > (fboundp '(setf foo)). > > However, if I have instead used DEFINE-SETF-EXPANDER or DEFSETF, is > there a way - portable or not - to find out if such a definition > exists? FBOUNDP returns NIL in this case, MACRO-FUNCTION doesn't > accept general function names as arguments, only symbols. Anything > else that I'm missing? Anything LW-specific maybe? > > Thanks, > Edi.