]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
Run `make grand-replace'.
[lilypond.git] / lily / parser.yy
index f821cd7efeb83db30bce19d4b67ac062d1056e21..83eaf89ec235912c7bccb69ef2b44dd9bc6b3943 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
                  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
@@ -508,10 +508,7 @@ toplevel_expression:
                Output_def * od = $1;
 
                if ($1->c_variable ("is-paper") == SCM_BOOL_T)
-               {
                        id = ly_symbol2scm ("$defaultpaper");
-                       init_papers (PARSER, od);
-               }
                else if ($1->c_variable ("is-midi") == SCM_BOOL_T)
                        id = ly_symbol2scm ("$defaultmidi");
                else if ($1->c_variable ("is-layout") == SCM_BOOL_T)
@@ -657,7 +654,7 @@ context_def_spec_body:
 book_block:
        BOOK '{' book_body '}'  {
                $$ = $3;
-               unstack_paper (PARSER);
+               pop_paper (PARSER);
        }
        ;
 
@@ -667,10 +664,11 @@ book_block:
 book_body:
        {
                $$ = new Book;
+               init_papers (PARSER);
                $$->origin ()->set_spot (@$);
                $$->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (PARSER->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
                $$->paper_->unprotect ();
-               stack_paper (PARSER, $$->paper_);
+               push_paper (PARSER, $$->paper_);
                $$->header_ = PARSER->lexer_->lookup_identifier ("$defaultheader"); 
        }
        | BOOK_IDENTIFIER {