lilypond-user
[Top][All Lists]
Advanced

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

Re: Conditional Definitions


From: Fr . Samuel Springuel
Subject: Re: Conditional Definitions
Date: Sat, 18 Feb 2023 11:14:58 -0500

After some searching, I’ve found that Scheme has the define-once construct 
which does exactly what I was looking for

✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ

> On Feb 15, 2023, at 2:54 PM, Fr. Samuel Springuel <rpspringuel@gmail.com> 
> wrote:
> 
> I recently upgraded from 2.22 to 2.24 and have run into some problems with 
> one of my tools.  The tool is set up to define some some stuff (in the 
> example attached below I’ve narrowed it down to be just a color), but only if 
> that thing is not already defined.  The reason for this is because the 
> definitions are in included files.  There’s a master style file which defines 
> everything and then a variant style file where only some things are defined 
> (the things that are different from the master style file).  The master style 
> file is included explicitly in the source files, while the variant style file 
> is included automatically by lyluatex if certain conditions are met in the 
> document, and that inclusion happens before the contents of the source file.  
> This means I have to prevent a redefinition rather than exploit it.  I was 
> doing this just fine in 2.22, but 2.24 complains about definition being 
> wrapped in a conditional.  I believe this has to do with the switchover in 
> Guile versions, but I don’t know enough about Guile to figure out how to fix 
> it (and no, convert-ly does not help here).
> 
> Attached is my MWE.
> 
> ✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
> Fr. Samuel, OSB
> (R. Padraic Springuel)
> St. Anselm’s Abbey
> 4501 South Dakota Ave, NE
> Washington, DC, 20017
> 202-269-2300
> (c) 202-853-7036
> 
> PAX ☧ ΧΡΙΣΤΟΣ
> <aster_test.ily>




reply via email to

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