Lukas-Fabian Moser <[email protected]> writes: > Hi Maurits, > > Am 20.08.20 um 11:10 schrieb Maurits Lamers: >> Hi, >> >> Great! This is the perfect solution. I had to adjust the >> (define-scheme-function) call a bit to run also under 2.18: >> >> setStructuralVoice = #(define-scheme-function (parser location num) >> (integer?) >> (make-apply-context >> (lambda (context) >> (ly:context-set-property! context 'structuralVoice (if (> num 0) num >> '()))))) >> >> It might need even more tweaks to run under 2.14 which is my target. I know >> it is a very old version, but there is a large body of Lilypond code my work >> depends on and that is lilypond 2.14. I am afraid that it would distract the >> current effort and cost too much time at the moment to convert that body of >> work to a more recent version of lilypond. >> >> So, it will probably end up like this, as I am unsure whether lilypond v20 >> can deal with v18 type calls to define-scheme-function. > > [...] > > No need for that: When David K. got rid of the need to write out > parser/location in every function definition five years ago, he also > added a mechanism that detects and supports old-style usage (starting > with "parser"). So your above definition works just fine in 2.20/2.21. > > Nevertheless, I'd urge you to try and make sure that everything you > develop will work with current LilyPond versions. Not only in order to > lower the barrier for developers to help you (or others to make use of > your additions), but also because LilyPond simply has evolved a great > deal in the in the nine (!!) years since 2.14.2 was released, and is > now at the same time much more feature-rich _and_ easier to use.
Well, that's not much of a motivation to upgrade existing documents (unless you want to add to them). But the typesetting has become quite a bit better, too. -- David Kastrup
