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.
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;
}
output_def:
output_def_body '}' {
$$ = $1;
- if ($1->parent_)
- THIS->lexer_->remove_scope ();
THIS->lexer_->remove_scope ();
THIS->lexer_->pop_state ();
| PAPER {
Output_def *p = get_paper (THIS);
- if (p->parent_)
- THIS->lexer_->add_scope (p->parent_->scope_);
-
THIS->lexer_->add_scope (p->scope_);
$$ = p;
}
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))))
page-stencil))))
)
- (if #t
+ (if #f
(display (list
"leftmargin" leftmargin "rightmargin" rightmargin
)))
))
(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*