]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lily-parser.cc (get_paper): don't set parent for \paper
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Sep 2004 20:23:51 +0000 (20:23 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Sep 2004 20:23:51 +0000 (20:23 +0000)
blocks in the parser. This eliminates ordering dependency for
\bookpaper and \paper

* ly/part-paper-init.ly: remove file.

ChangeLog
lily/lily-parser.cc
lily/parser.yy
ly/init.ly
scm/page-layout.scm
scm/paper.scm

index 93726f7927d2cc541a592861f80e746167712f2d..6582ebe74fb7e837f8bf18dd3fba8e154c17cdcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-09-20  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/lily-parser.cc (get_paper): don't set parent for \paper
+       blocks in the parser. This eliminates ordering dependency for
+       \bookpaper and \paper
+
        * ly/part-paper-init.ly: remove file.
 
        * lily/includable-lexer.cc (new_input): elucidate message.
index 8ad9b9c47e4224e9b6aac15e4ca2fc4565230ba0..fc40c51e9687c437c3051a4a05c83a67d6998330 100644 (file)
@@ -381,7 +381,6 @@ get_paper (Lily_parser *parser)
   paper = paper ? paper->clone () : new Output_def;
   paper->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
 
-  paper->parent_ = unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultbookpaper"));
   return paper;
 }
 
index f14af09fae5a592323e91e43f32d854554b6e993..9875722b79403293c2dca07730bb058b45283c63 100644 (file)
@@ -721,8 +721,6 @@ book_paper_block:
 output_def:
        output_def_body '}' {
                $$ = $1;
-               if ($1->parent_)
-                       THIS->lexer_->remove_scope ();
 
                THIS->lexer_->remove_scope ();
                THIS->lexer_->pop_state ();
@@ -743,9 +741,6 @@ output_def_head:
        | PAPER         {
                Output_def *p = get_paper (THIS);
 
-               if (p->parent_)
-                       THIS->lexer_->add_scope (p->parent_->scope_);
-
                THIS->lexer_->add_scope (p->scope_);
                $$ = p;
        }
index 38350767dd4982eee57185839852d2f46758bc72..7bf71bf26cacc7760c0bf6ba9c8786286547ef96 100644 (file)
@@ -29,7 +29,7 @@
            input-file-name ": old relative compatibility was not used."
        )))%% there is a problem at the end of the input file
 
-
+#(display "HAI")
 #(if (pair? toplevel-scores)
   (ly:parser-print-book parser
    (apply ly:make-book $defaultbookpaper $globalheader (reverse toplevel-scores))))
index 77329656580604cf1b666657ab6bae7482212ae5..4a196459756740e5ee4a6fc4cb9bbb93edb195b2 100644 (file)
                           page-stencil))))
       )
 
-    (if #t
+    (if #f
        (display (list
                  "leftmargin" leftmargin "rightmargin" rightmargin
                  )))
index a2b359f15431b529c0d05cc2253262c774e42a0d..b4d8830727366c36e2f2031b2b6b84d51bafdb40 100644 (file)
    ))
 
 (define-public (set-paper-size name . rest)
-  (if (module-defined? (current-module) 'is-paper)
+  (if (module-defined? (current-module) 'is-bookpaper)
       (internal-set-paper-size (current-module) name
                               (memq 'landscape rest))
 
       ;;; TODO: should raise (generic) exception with throw, and catch
       ;;; that in parse-scm.cc
-      (ly:warn "Must use #(set-paper-size .. ) within \\paper { ... }")))
+      (ly:warn "Must use #(set-paper-size .. ) within \\bookpaper { ... }")))
 
 (define-public (scale-paper pap scale)
   (let*