... better to use define-void-function
%%% snip %%%
pdefine = #(define-void-function (sym val)(symbol? scheme?)
(ly:parser-define! sym val))
%%% snip %%%
Cheers
Jan-Peter
Am 17.02.2016 um 10:56 schrieb Jan-Peter Voigt:
> Hi Graham,
>
> I didn't went through the whole thread, but IIUC, the problem is about
> defining variables inside a pair of braces. Sometimes I use a helper
> function to define variables:
>
> %%% snip %%%
> \version "2.19.35"
>
> % a little helper function using ly:parser-define!
> pdefine = #(define-scheme-function (sym val)(symbol? scheme?)
> (ly:parser-define! sym val))
>
> \book {
> % define "music"
> \pdefine music \relative { c' d e f }
> \score {
> \music
> }
> }
> %%% snip %%%
> of course, you might also just write
> $(ly:parser-define! 'music #{ \relative { c' d e f } #})
> without defining "pdefine" (or whatever you like to name it, but avoid
> "define" ;) )
>
> HTH
> Jan-Peter
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user