On Tue 13 Dec 2011 18:28, Mark H Weaver <m...@netris.org> writes: > >> (let ((xxx 2)) > >> #{ #(set! xxx (1+ xxx)) #})
> In the general case, Lilypond needs to _execute_ the outer Scheme code > before the parser/evaluator is able to even _see_ the inner Scheme code, > because it needs to parse/evaluate the Lily code in between the two, and > we've already established that parsing cannot be not be done without > runtime information. What does it mean to execute a `(let ((xxx 2))' ? I think I need to read the thread again, because I am really not getting it. > (let ((xxx 2)) > (capture-lexical-environment)) > > How difficult would it be to implement this? Dunno. I was thinking that we could have a special form to return a list of the identifiers in scope. Or perhaps, some syntax-bindings procedure, to operate on syntax objects. A macro could use that data to make a closure that captures all of the bindings, if that's your thing. Andy -- http://wingolog.org/