Am Montag, 5. September 2011, 23:02:11 schrieb David Kastrup: > #{..#} _is_ a direct Scheme construct interpreted at _read_ time in the > Scheme reader. It is enabled in scm/parser-ly-from-scheme.scm with the > line (read-hash-extend #\{ read-lily-expression). > > Within Lilypond, there is no place where you can read Scheme source but > not a #{...#} construct except in the load order before > scm/parser-ly-from-scheme.scm.
Actually, what I meant was that sometimes you are writing a scheme function, and you are constructing context mods in scheme. If you already have a list of context mod entries, how can you create the context mod? (let* ((mod-entries (map create-mod-from-something your-list))) #{ \with { % What comes here to turn the scheme list mod-entries into % context mod??? } #}) Also, this creates a snippet in lilypon syntax from an existing scheme list, just to have it parsed and the exact list created again by the parser. So, that's not very efficient. And the other direction (creating the context mod first and then adding individual modifications to that object) is also not straightforward scheme syntax: (let* ((context-mod #{ \with {} #})) (ly:add-context-mod context-mod your-new-entry)) is harder to understand than (let* ((context-mod (ly:make-context-mod (list your-new-entry))) or (let* ((context-mod (ly:make-context-mod))) (ly:add-context-mod context-mod your-new-entry)) > So "directly in Scheme" is a mischaracterization, Sorry for being imprecise. What I meant was "directly in Scheme syntax". Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel