]> git.donarmstrong.com Git - lilypond.git/commitdiff
(split_options): Bugfix. Small code
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 6 Apr 2005 12:51:09 +0000 (12:51 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 6 Apr 2005 12:51:09 +0000 (12:51 +0000)
formatting cleanups.

ChangeLog
scripts/lilypond-book.py

index 15c8d2a631e9105736f9fdcf41dd542fa18e1913..4f3a33256ee0e781271b171f65f3638110bfac00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-04-06  Jan Nieuwenhuizen  <jan.nieuwenhuizen@aspiratie.nl>
 
+       * scripts/lilypond-book.py (split_options): Bugfix.  Small code
+       formatting cleanups.
+
        * mf/GNUmakefile: Rewrite $addprefix, $addsuffix using % short-forms.
        Add PFAaybabtu.pfa dependency on aybabtu.subfonts.
 
index db322aa215efa6668601fac084e2bf1a1f157aae..c46c0b7c9aa8e658845dbc760284b44eb18768d4 100644 (file)
@@ -616,7 +616,10 @@ def verbatim_texinfo (s):
                               re.sub ('@', '@@', s)))
 
 def split_options (option_string):
-       return re.split (format_res[format]['option_sep'], option_string)
+       if option_string:
+               return re.split (format_res[format]['option_sep'],
+                                option_string)
+       return []
 
 class Chunk:
        def replacement_text (self):
@@ -674,7 +677,7 @@ class Lilypond_snippet (Snippet):
        def __init__ (self, type, match, format, line_number):
                Snippet.__init__ (self, type, match, format, line_number)
                os = match.group ('options')
-               self.do_options (os,self.type)
+               self.do_options (os, self.type)
 
        def ly (self):
                return self.substring ('code')
@@ -1194,7 +1197,8 @@ def process_snippets (cmd, ly_snippets, texstr_snippets, png_snippets):
        # it is too generic for lilypond-book.
        if texstr_names and re.search ('^[0-9A-Za-z/]*lilypond', cmd):
 
-               my_system (string.join ([cmd,'--backend texstr', 'snippet-map.ly'] + texstr_names))
+               my_system (string.join ([cmd, '--backend texstr',
+                                        'snippet-map.ly'] + texstr_names))
                for l in texstr_names:
                        my_system ('latex %s.texstr' % l)
 
@@ -1502,7 +1506,8 @@ def main ():
        if format == TEXINFO or format == HTML:
                formats += ',png'
        if process_cmd == '':
-               process_cmd = lilypond_binary + ' --formats=%s --backend eps ' % formats
+               process_cmd = lilypond_binary \
+                             + ' --formats=%s --backend eps ' % formats
 
        if process_cmd:
                process_cmd += string.join ([(' -I %s' % p)