]> git.donarmstrong.com Git - lilypond.git/commit
Fix #903: a simpler syntax for note names language
authorValentin Villenave <valentin@villenave.net>
Sat, 23 Oct 2010 23:26:17 +0000 (01:26 +0200)
committerValentin Villenave <valentin@villenave.net>
Sat, 23 Oct 2010 23:26:17 +0000 (01:26 +0200)
commit02fe038744e634b42f1a3377c4f0dc3d25e80344
tree184d79569b36c92d813d4f09601f54fef64f23c9
parent25a94417fb5484035bb816260a2168c17ae675ec
Fix #903: a simpler syntax for note names language

This commit adds a new
  \language "foo"
command, where "foo" is the (case-insensitive) name of
any supported language, e.g. "italiano", "suomi" etc.

This function may be used at top-level or anywhere else,
even in -dsafe mode.
Non-supported languages arguments are, well, not supported:
if no recognizable string is provided, ly:gulp-file will just
barf its standard error message.

To preserve full compatibility with existing code, this patch
leaves .ly language files unchanged (therefore, the old syntax
is still perfectly valid).  Since all it does is extract the
pitchnames alist from whatever file it processes, more complex
files such as "arabic.ly" are not supported and will output
an error message explaining that \include should be used instead.

In spite of this limitation, this method is a convenient way
of presenting foreign users with a simplified syntax, without
having to bloat the parser with yet another keyword.  Of
course, it may be superseeded in the future with a more
specialized implementation, possibly doing away with .ly files
(if we reach a point where preserving compatibility is no
longer an issue).
Documentation/changes.tely
Documentation/notation/pitches.itely
ly/music-functions-init.ly