lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining 'not-last-page'


From: Neil Puttock
Subject: Re: Defining 'not-last-page'
Date: Fri, 15 Jul 2011 23:15:58 +0100

On 15 July 2011 23:06, Matthew Collett <address@hidden> wrote:
> On 15/07/2011, at 11:07 pm, Matthew Collett wrote:
>
>> I still don't understand why I can use 'last-page' (defined in 
>> titling-init.ly) with no problem, but cannot use 'book-last-page?' (also 
>> defined in titling-init.ly) unless I redefine it myself.
>
> Some further investigation:
>
> 'titling-init' is included by 'paper-defaults-init' which is included by 
> 'declarations-init' which is included by 'init'.
>
> Adding an explicit (and apparently redundant)
> \include "titling-init.ly"
> to my original file solves the problem; that is, it makes 'book-last-page?' 
> available for use as expected.
>
> Going up one level, and instead saying
> \include "paper-defaults-init.ly"
> makes the original problem reappear ('ERROR: Unbound variable: 
> book-last-page?').

The contents of titling-init.ly is within the scope of a \paper block;
this is a different module from the one where you put your .ly code.
Since none of the defines are public, they aren't exported as part of
the public interface for the module, so they're invisible outside the
\paper block.

> Is there a rule in Scheme that names ending in '?' have restricted scope?

No.  It's just a naming convention.

Cheers,
Neil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]