[Top][All Lists]

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

Feature request \includeonce

From: Urs Liska
Subject: Feature request \includeonce
Date: Thu, 21 Mar 2013 10:00:25 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4


I'm missing a command in LilyPond to include a file only once.
I am working on a general purpose LilyPond library where I am in the situation that many library files have to access common functions and therefore have to include the same file (with these helper functions). Although I assume that it doesn't harm to include a file several times (I think the functions will just be redefined identically) this looks like quite undesired behaviour.

I could figure out a Scheme based solution myself and also found some references to threads on lilypond-user (mainly from 2010). Basically the idea would be to define a variable in that helper file and subsequently only include that file if that variable isn't defined already. But I think that functionality is quite fundamental and should be supported by LilyPond directly.

Therefore I would like to ask for the following feature:

"Implement a command \includeonce that includes a file just like \include, but only once.
Like include_once() in PHP or \RequirePackage in LaTeX."


reply via email to

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