Am 05.02.2013 11:07, schrieb David Kastrup:
Jan-Peter Voigt <jp.vo...@gmx.de> writes:
Hi Urs,
you can write a music-function that conditionally includes files.
I use a function to include a file, if it exists. The if statement can
of course also test for a option with ly:get-option.
\version "2.16.0"
includeIfExists =
#(define-music-function (parser location file)(string?)
(if (file-exists? file)
(ly:parser-include-string parser (format "\\include \"~A\"\n" file)))
(make-music 'SequentialMusic 'void #t))
Any reason you don't use define-void-function here? Saves the somewhat
weird make-music call and is likely usable in more places.
I'm just not used to it ... thanks for the hint & reminder
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user