David Kastrup <d...@gnu.org> writes: > And I am not really convinced that if we move to local-eval at some > point of time that we'll be able to get `#{ ... #,... #} to work in a > reasonable time frame. Maybe that will be considered a show stopper > anyway, so we'll stay with the lambda implementation which manages to > survive this rather brutal mixture of Scheme and LilyPond.
As a note aside: I had played in Guile-1 with the rather brutal the-environment / local-eval implementation (define (local-eval form env) (call-with-current-continuation (lambda (x) (env (list x form))))) (define-macro (the-environment) (call-with-current-continuation identity)) Unsurprisingly, it does not work with GUILEv2. Surprisingly, it _does_ work with GUILEv1. The idea is that (the-environment) keeps a continuation into the macro expander, and local-eval feeds the macro expander/evaluator with something looking like a function call, the function being the continuation of the local-eval, and the function argument the form to be evaluated in the local environment. When the continuation arrives somewhere where evaluation happens, it will jump out again. Getting messier than that would seem challenging. It would be interesting to see how this code would hold up to the `#{ ... #, ... #} challenge. But as it won't work in GUILEv2, the interest is more of theoretical nature. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel