[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set-global-staff-size from inside Scheme function
From: |
Jan-Peter Voigt |
Subject: |
Re: set-global-staff-size from inside Scheme function |
Date: |
Fri, 16 May 2014 12:36:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Hi Urs,
the last statement the include returns is not music:
#(ly:set-option 'preview #t)
so the parser complains.
Those warnings can be avoided with void-functions, which wrap the statement.
(A bit in a hurry, so no example for noew ;) )
Cheers, Jan-Peter
Am 16.05.2014 12:05, schrieb Urs Liska:
> compileScore =
> #(define-void-function (parser location score)(ly:score?)
> #{ \include "example-styles.ily" #}
> (let ((book
> #{
> \book {
> % \include "example-styles.ily"
> \score { #score }
> }
> #}))
> (ly:book-process
> book
> #{ \paper {} #}
> #{ \layout{} #}
> (ly:parser-output-name parser))))
>
> works (i.e. doing the include first before the (let ) block).
> But I still get a warning
>
> "
> example-styles.ily:3:1: warning: Ignoring non-music expression
>
> #(set-global-staff-size 44)
> "
>
> I might accept this because the result is the accepted, but is there a
> way to avoid that warning?