On 9/21/07, Tobias C. Rittweiler <tcr@...> wrote:
> as [CLHS 18.104.22.168.1] specifies
> If the symbol is a symbol macro, its expansion function is
> obtained. The expansion function is a function of two arguments, and
> is invoked by calling the macroexpand hook [...]
> but SBCL currently ignores *macroexpand-hook* when expanding symbol
> (define-symbol-macro .foo. 'foobar)
> (let ((*macroexpand-hook* #'(lambda (fn form env)
> (format t "Expanding: ~S~%" form)
> (funcall fn form env))))
> (macroexpand '.foo.))
> ==> 'FOOBAR
> The attached patch fixes that (and the case for local symbol macros.)
> Test cases included. 22.214.171.124+patch compiled, and run test suite
> successfully on Linux/x86.
Thanks! Merged as 126.96.36.199 -- though I replaced the
MAKE-SYMBOL-MACRO-FUNCTION with CONSTANTLY.
Get latest updates about Open Source Projects, Conferences and News.