]> git.donarmstrong.com Git - lilypond.git/commitdiff
Lilypond-book: Allow the snippets class to declare its own used options
authorReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 11 Jun 2010 19:02:16 +0000 (21:02 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 11 Jun 2010 19:28:51 +0000 (21:28 +0200)
python/book_snippets.py

index 3c4f32d5d35ca7dded27a6ca29ce0ef36990cabc..fa4d97ccec6bb4d82db7ae96f7db30dbafdc2862 100644 (file)
@@ -328,6 +328,9 @@ class LilypondSnippet (Snippet):
         self.do_options (os, self.type)
 
 
+    def snippet_options (self):
+        return [];
+
     def verb_ly_gettext (self, s):
         lang = self.formatter.document_language
         if not lang:
@@ -529,7 +532,7 @@ left-margin-default right-margin-default)"
                     found = 1
                     break
 
-            if not found and key not in simple_options:
+            if not found and key not in simple_options and key not in self.snippet_options ():
                 warning (_ ("ignoring unknown ly option: %s") % key)
 
         # URGS