From: Han-Wen Nienhuys Date: Mon, 20 Sep 2004 20:23:51 +0000 (+0000) Subject: * lily/lily-parser.cc (get_paper): don't set parent for \paper X-Git-Tag: release/2.3.19~46 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=11295cfc7c54fbb84295c691ad92345fb2762722;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 93726f7927..6582ebe74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-09-20 Han-Wen Nienhuys + * 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. diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 8ad9b9c47e..fc40c51e96 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -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; } diff --git a/lily/parser.yy b/lily/parser.yy index f14af09fae..9875722b79 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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; } diff --git a/ly/init.ly b/ly/init.ly index 38350767dd..7bf71bf26c 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -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)))) diff --git a/scm/page-layout.scm b/scm/page-layout.scm index 7732965658..4a19645975 100644 --- a/scm/page-layout.scm +++ b/scm/page-layout.scm @@ -168,7 +168,7 @@ page-stencil)))) ) - (if #t + (if #f (display (list "leftmargin" leftmargin "rightmargin" rightmargin ))) diff --git a/scm/paper.scm b/scm/paper.scm index a2b359f154..b4d8830727 100644 --- a/scm/paper.scm +++ b/scm/paper.scm @@ -130,13 +130,13 @@ )) (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*