lilypond-devel
[Top][All Lists]
Advanced

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

Re: Move note names to scm (issue3247041)


From: Carl . D . Sorensen
Subject: Re: Move note names to scm (issue3247041)
Date: Thu, 25 Nov 2010 15:19:18 +0000

On 2010/11/25 12:24:44, Valentin Villenave wrote:
On 2010/11/24 00:10:01, Neil Puttock wrote:
> The indentation inside language-pitch-names is artificially
compressed, e.g.,

That allowed me to make git regard the file as renamed instead of
rewritten. But
you're right, I've fixed the indentation.

BTW: Neil, I did follow your advice or loading all the pitchnames
alists and
then selecting the one that's needed (if at all), but am still
concerned by the
overhead. The previous implementation \include "foobar.ly", as well as
my
initial ly:gulp-file hack, had both the same advantage, in that it
didn't load
alists that weren't actually required by the user (many users won't
ever use
\language, after all). Don't you think things are a bit heavier now?

They may be a bit heavier now, but the amount of storage that the
language alists take is insignificant compared to LilyPond's overall
memory usage.  I don't see a problem at all.


Carl: instead of implementing two new functions, I've created a new
other-language variable. I think it's slightly more elegant, can you
have a look
and let me know what you think?


I think the previous approach was better.  Saving a setting of the
current language and then restoring it is exactly the desired
functionality.  You wrote exactly the right code previously; I think it
should just be made more accessible than it was.

Now that I think about it, I assume that the problem you were having is
that music functions aren't evaluated during parsing, and that the
changes you need have to be made during parsing.  So we need to have
Scheme functions, not music functions.

So I think

#(save-and-change-language default-language)

and

#(restore-saved-language)

would handle the situation very nicely.

Thanks,

Carl


http://codereview.appspot.com/3247041/



reply via email to

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