On Mon, Oct 03, 2011 at 02:41:13PM +0200, David Kastrup wrote: > Juha Erkkila <[email protected]> writes: > > I had some lilypond code that worked in 2.12 versions, but appears > > broken in 2.14. I had used a construction in which a music function > > calls itself. Here's an example: > > > > ---------------------------------------------------------------------- > > tags = #(define-music-function (parser location tags music) > > (list? ly:music?) > > (cond ((null? tags) music) > > (else (let ((firsttag (car tags)) > > (othertags (cdr tags))) > > #{ \tags $othertags \tag $firsttag $music #})))) > > > > foo = \tag #'a \tag #'b { c4 d e f } > > bar = \tags #'(a b) { c4 d e f } > > > > \score { > > { > > \keepWithTag #'a \foo > > \keepWithTag #'b \foo > > > > \keepWithTag #'a \bar > > \keepWithTag #'b \bar > > } > > } > > ---------------------------------------------------------------------- > > The problem here is that you are writing $othertags. This tells > Lilypond that it should figure out on its own what syntactic type > $othertags should receive. An empty list meets the markup-list? > predicate, so Lilypond decides to consider this a markup list > syntactically. Which is not compatible with the list? predicate, since > that is looking for a Scheme expression (or a simple string) > syntactically. > > So just writing #$othertags should put Lilypond on the right track and > keep it from guessing the syntactical class wrong here.
Ah, that explains it. Thank you, your solution works. Juha _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
