On Sat 04 Feb 2012 21:31, Stefan Israelsson Tampe <stefan.ita...@gmail.com> writes:
> #'(begin > (define f fkn-definition) > (define-syntax name > (make-syntax-case-transformer > (make-stxclass > ... > (datum->syntax #'name 'f) > ...)))) > > This code expans ok in the toplevel. But if expanded elsewhere in definition > context f is not reached from the data associated with the macro. So, a few things. One is that if #'name came from the macro invocation but f did not, then indeed f is not visible from #'name. That this works at the top level is a byproduct of a bug in stable-2.0 that is "fixed" in master. (There are two bugs: one about module scoping of introduced toplevel identifiers, and another about the symbolic names of introduced toplevel identifiers. See https://savannah.gnu.org/bugs/?31472.) > So how can I make this to work in both contexts? Just use #'f instead of (datum->syntax #'name 'f). Cheers, Andy -- http://wingolog.org/