bug-lilypond
[Top][All Lists]
Advanced

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

New language feature breaks lilypond-words


From: Jay Anderson
Subject: New language feature breaks lilypond-words
Date: Thu, 9 Dec 2010 21:29:49 -0700

This is a small annoyance, but one I didn't see reported.
lilypond-words.py used the language files to generate the list of
lilypond words. Since these language files now only include \language
"mylanguage" many note names are not being found. The result is vim
syntax highlighting (and I imagine also emacs) doesn't highlight many
note names. A suggested patch is at the end of this email. I adjusted
the regular expression so it wouldn't include the language name as
part of note_names. Thanks.

-----Jay

diff --git a/scripts/build/lilypond-words.py b/scripts/build/lilypond-words.py
index ef6328f..d65ecdb 100644
--- a/scripts/build/lilypond-words.py
+++ b/scripts/build/lilypond-words.py
@@ -47,21 +47,8 @@ for name in ['ly/chord-modifiers-init.ly',
     keywords += [w for w in re.findall (r"(?m)^\s*\"?([a-zA-Z]+)\"?\s*=", s)]

 # note names
-for name in ['ly/catalan.ly',
-             'ly/deutsch.ly',
-             'ly/drumpitch-init.ly',
-             'ly/english.ly',
-             'ly/espanol.ly',
-             'ly/italiano.ly',
-             'ly/makam.ly',
-             'ly/nederlands.ly',
-             'ly/norsk.ly',
-             'ly/portugues.ly',
-             'ly/suomi.ly',
-             'ly/svenska.ly',
-             'ly/vlaams.ly']:
-    s = open (name, 'r').read ()
-    note_names += [n for n in re.findall
(r"(?m)^\s*\(([a-z]+)[^l]+ly:make-pitch", s)]
+s = open ('ly/language-init.ly', 'r').read ()
+note_names += [n for n in re.findall
(r"(?m)^\s*\(([a-z]+)\s*\.\s*,\(ly:make-pitch", s)]

 # reserved words
 for name in ['ly/engraver-init.ly',



reply via email to

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