]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix lilypond-book fragment options generation
authorJohn Mandereau <john.mandereau@gmail.com>
Mon, 1 Feb 2010 00:25:42 +0000 (00:25 +0000)
committerJohn Mandereau <john.mandereau@gmail.com>
Tue, 2 Feb 2010 22:32:15 +0000 (23:32 +0100)
Option strings were previously generated multiple time due to
erroneous loop constructs.

scripts/lilypond-book.py

index ac3969c9cc27335d69feae420d47b8d249bdb112..4e02289031723665bed5c92cc91d64cf93b8b22f 100644 (file)
@@ -1202,13 +1202,20 @@ left-margin-default right-margin-default)"
         override[LINE_WIDTH] = texinfo_line_widths['@smallbook']
         override.update (default_ly_options)
 
+        def not_processing_independent (opt):
+            for name in PROCESSING_INDEPENDENT_OPTIONS:
+                if opt.startswith (name):
+                    return False
+
+            return True
+
         option_list = []
         for option in self.get_option_list ():
-            for name in PROCESSING_INDEPENDENT_OPTIONS:
-                if not option.startswith (name):
-                    option_list.append (option)
+            option_list.append (option)
+        warning ("option_string before: %s" % option_list)
+        option_list = filter (not_processing_independent, option_list)
         option_string = ','.join (option_list)
-
+        warning ("option_string: %s" % option_string)
         compose_dict = {}
         compose_types = [NOTES, PREAMBLE, LAYOUT, PAPER]
         for a in compose_types: