From 1c5b28defa29c019a3d2038bf4b19ed215ec2d87 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 29 May 2004 13:11:45 +0000 Subject: [PATCH] * lily/staff-symbol-engraver.cc (acknowledge_grob): remove item -> staffsymbol dependency. * lily/include/grob.hh (class Grob): live () -> is_live (). Small cleanups. * lily/parser.yy (book_body): book header is initted to $globalheader. --- ChangeLog | 6 + lily/accidental-placement.cc | 2 +- lily/align-interface.cc | 2 +- lily/dot-column.cc | 2 +- lily/dynamic-engraver.cc | 10 +- lily/grob-property.cc | 4 +- lily/grob.cc | 8 +- lily/include/grob.hh | 15 +-- lily/include/output-def.hh | 22 +++- lily/note-collision.cc | 2 +- lily/note-spacing.cc | 6 +- lily/paper-book.cc | 9 +- lily/paper-column.cc | 2 +- lily/parser.yy | 204 ++++++++++++++++------------------ lily/piano-pedal-engraver.cc | 8 +- lily/staff-symbol-engraver.cc | 3 - lily/stem-tremolo.cc | 2 +- lily/system.cc | 2 +- lily/tie-column.cc | 2 +- scm/lily.scm | 11 +- 20 files changed, 164 insertions(+), 158 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bddbebc1f..1955b018e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2004-05-29 Han-Wen Nienhuys + * lily/staff-symbol-engraver.cc (acknowledge_grob): remove item -> + staffsymbol dependency. + + * lily/include/grob.hh (class Grob): live () -> is_live (). Small + cleanups. + * lily/book.cc (process): return Paper_book (to_stencil): use Book::process(). diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 71d48910b8..12b2117161 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -250,7 +250,7 @@ stagger_apes (Link_array *apes) SCM Accidental_placement::position_accidentals (Grob * me) { - if (!me->live ()) + if (!me->is_live ()) return SCM_UNSPECIFIED; SCM accs = me->get_property ("accidental-grobs"); diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 8f5ece2511..6c08f13de4 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -82,7 +82,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a) && Hara_kiri_group_spanner::has_interface (elems[j])) Hara_kiri_group_spanner::consider_suicide (elems[j]); - if (!elems[j]->live ()) + if (!elems[j]->is_live ()) elems.del (j); } diff --git a/lily/dot-column.cc b/lily/dot-column.cc index f3669231c8..1a7f3cc601 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -255,7 +255,7 @@ Dot_column::do_shifts (Grob*me) dots.sort (compare_position); for (int i = dots.size (); i--;) - if (!dots[i]->live ()) + if (!dots[i]->is_live ()) dots.del (i); Dot_configuration cfg; diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 31368b175c..8b47624931 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -286,7 +286,7 @@ Dynamic_engraver::finalize () typeset_all (); if (line_spanner_ - && !line_spanner_->live ()) + && !line_spanner_->is_live ()) line_spanner_ = 0; if (line_spanner_) { @@ -295,7 +295,7 @@ Dynamic_engraver::finalize () } if (cresc_ - && !cresc_->live ()) + && !cresc_->is_live ()) cresc_ = 0; if (cresc_) { @@ -315,10 +315,10 @@ Dynamic_engraver::typeset_all () Maybe just check at typeset_grob ()? */ if (finished_cresc_ - && !finished_cresc_->live ()) + && !finished_cresc_->is_live ()) finished_cresc_ = 0; if (finished_line_spanner_ - && !finished_line_spanner_->live ()) + && !finished_line_spanner_->is_live ()) finished_line_spanner_ = 0; if (finished_cresc_) @@ -382,7 +382,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) { if (line_spanner_ /* Don't refill killed spanner */ - && line_spanner_->live ()) + && line_spanner_->is_live ()) { Side_position_interface::add_support (line_spanner_,i.grob_); add_bound_item (line_spanner_,dynamic_cast (i.grob_)); diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 72353140f3..f351d1ba36 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -69,7 +69,7 @@ void Grob::internal_set_property (SCM s, SCM v) { /* Perhaps we simply do the assq_set, but what the heck. */ - if (!live ()) + if (!is_live ()) return; if (internal_type_checking_global_b) @@ -113,7 +113,7 @@ Grob::substitute_mutable_properties (SCM crit, SCM orig) bool -Grob::live () const +Grob::is_live () const { return immutable_property_alist_ != SCM_EOL; } diff --git a/lily/grob.cc b/lily/grob.cc index 5ca831a51a..79152064b4 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -196,7 +196,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) Stencil * Grob::get_stencil () const { - if (!live ()) + if (!is_live ()) { return 0; } @@ -207,7 +207,7 @@ Grob::get_stencil () const mol = get_uncached_stencil (); - if (live ()) + if (is_live ()) { Grob *me = (Grob*)this; me->set_property ("stencil", mol); @@ -306,7 +306,7 @@ Grob::handle_broken_dependencies () System *system = get_system (); - if (live () + if (is_live () && system && common_refpoint (system, X_AXIS) && common_refpoint (system, Y_AXIS)) { substitute_mutable_properties (system ? system->self_scm () : SCM_UNDEFINED, @@ -339,7 +339,7 @@ Grob::handle_broken_dependencies () void Grob::suicide () { - if (!live ()) + if (!is_live ()) return; diff --git a/lily/include/grob.hh b/lily/include/grob.hh index ba7a7b8a0d..2be13c6c24 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -22,7 +22,6 @@ */ enum Grob_status { ORPHAN=0, // not yet added to Paper_score - VIRGIN, PRECALCING, PRECALCED, // calcs before spacing done POSTCALCING, // busy calculating. This is used to trap cyclic deps. @@ -52,13 +51,6 @@ public: 0 means ORPHAN, */ char status_; - - - /* - IDEA: make this a global variable. This is the same for all - elements, I think it is safe to assume that we will not have - scores being formatted multithreadedly. - */ Paper_score *pscore_; Dimension_cache dim_cache_[NO_AXES]; @@ -77,8 +69,6 @@ public: void warning (String)const; void programming_error (String)const; - void set_elt_pointer (const char*, SCM val); - friend class Property_engraver; // UGHUGHUGH. /* related classes. */ @@ -111,7 +101,7 @@ public: SCM get_property_alist_chain (SCM) const; void suicide (); - bool live () const; + bool is_live () const; DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis)); @@ -136,7 +126,6 @@ public: Real relative_coordinate (Grob const* refp, Axis) const; Grob*common_refpoint (Grob const* s, Axis a) const; - // duh. slim down interface here. (todo) bool has_offset_callback (SCM callback, Axis)const; void add_offset_callback (SCM callback, Axis); @@ -145,8 +134,8 @@ public: Real get_offset (Axis a) const; void set_parent (Grob* e, Axis); - Grob *get_parent (Axis a) const { return dim_cache_[a].parent_; } + DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM)); }; diff --git a/lily/include/output-def.hh b/lily/include/output-def.hh index 8b5ab341ea..cd76d29881 100644 --- a/lily/include/output-def.hh +++ b/lily/include/output-def.hh @@ -16,8 +16,26 @@ #include "smobs.hh" #include "input.hh" -/** - Definition of how to output lilypond. +/* + Output settings for a block of music. + + This devolved into a rather empty class. The distinction between + various instances is made in the parser, which creates + midi/paper/bookpaper blocks depending on the keyword read. + + The data structure is set up as recursive: the definitions not + supplied in paper are looked up in bookpaper. This is done through + the parent_ field of Output_def. However, such nesting is limited to + two levels, + + * first because the parser hard-codes the different types + of output block. + + * Second, because the prime benefit of multiple levels + (eg. bookpaper containing paper for a score, containing paper of a + \score embedded in \markup) requires scaling the Stencils (eg. the + one coming from score at markup level) + */ class Output_def { diff --git a/lily/note-collision.cc b/lily/note-collision.cc index ee3f53c888..02dc5a08e6 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -237,7 +237,7 @@ check_meshing_chords (Grob *me, d->suicide (); } - if (wipe_ball && wipe_ball->live ()) + if (wipe_ball && wipe_ball->is_live ()) { wipe_ball->set_property ("transparent", SCM_BOOL_T); wipe_ball->set_property ("stencil", SCM_EOL); diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 3a9d904e28..54a391a881 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -164,7 +164,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, Item * Note_spacing::left_column (Grob *me) { - if (!me->live ()) + if (!me->is_live ()) return 0; return dynamic_cast (me)->get_column (); @@ -181,7 +181,7 @@ prune RIGHT-ITEMS. Item * Note_spacing::right_column (Grob*me) { - if (!me->live ()) + if (!me->is_live ()) return 0; SCM right = me->get_property ("right-items"); @@ -273,7 +273,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Grob *stem = Note_column::get_stem (it); - if (!stem || !stem->live ()) + if (!stem || !stem->is_live ()) { if (d == RIGHT && Separation_item::has_interface (it)) { diff --git a/lily/paper-book.cc b/lily/paper-book.cc index b304ee4472..04759a3b1c 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -87,7 +87,6 @@ Paper_book::print_smob (SCM smob, SCM port, scm_print_state*) TODO: there is too much code dup, and the interface is not clear. FIXME. */ - void Paper_book::output (String outname) { @@ -101,7 +100,11 @@ Paper_book::output (String outname) Paper_outputter *out = get_paper_outputter (outname); int page_count = scm_ilength (pages); - out->output_header (bookpaper_, scm_list_1 (header_), page_count, false); + SCM scopes = SCM_EOL; + if (ly_c_module_p (header_)) + scopes = scm_cons (header_, scopes); + + out->output_header (bookpaper_, scopes, page_count, false); for (SCM s = pages; s != SCM_EOL; s = ly_cdr (s)) { @@ -169,7 +172,7 @@ Paper_book::classic_output (String outname) scopes = scm_cons (score_lines_[0].header_, scopes); //end ugh - out->output_header (p, header_, 0, true); + out->output_header (p, scopes, 0, true); SCM top_lines = score_lines_.top ().lines_; Paper_line *first = unsmob_paper_line (scm_vector_ref (top_lines, diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 6f52171db1..5e5bc659a5 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -151,7 +151,7 @@ Paper_column::before_line_breaking (SCM grob) { Grob * g = unsmob_grob (ly_car (*ptrptr)); - if (!g || !g->live ()) + if (!g || !g->is_live ()) { *ptrptr = ly_cdr (*ptrptr); } diff --git a/lily/parser.yy b/lily/parser.yy index a5d77bd4da..593f7acca5 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -304,6 +304,7 @@ or %token TYPE %token UNSET %token WITH +%token MARKUP /* escaped */ /* FIXME: this sucks. The user will get to see these names: @@ -311,115 +312,110 @@ or \ %% */ + %token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE %token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE %token E_BACKSLASH -%token E_UNSIGNED %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET CHORD_SLASH %token FIGURE_SPACE %token DIGIT -%token NOTENAME_PITCH -%token TONICNAME_PITCH -%token CHORDMODIFIER_PITCH -%token DURATION_IDENTIFIER -%token FRACTION +%token UNSIGNED +%token E_UNSIGNED %token IDENTIFIER -%token DRUMS +%token CHORDMODIFIER_PITCH %token DRUM_PITCH -%token CHORD_MODIFIER -%token SCORE_IDENTIFIER -%token MUSIC_OUTPUT_DEF_IDENTIFIER -%token NUMBER_IDENTIFIER +%token DURATION_IDENTIFIER %token EVENT_IDENTIFIER %token MUSIC_IDENTIFIER CONTEXT_DEF_IDENTIFIER -%token STRING_IDENTIFIER SCM_IDENTIFIER +%token NOTENAME_PITCH +%token NUMBER_IDENTIFIER +%token OUTPUT_DEF_IDENTIFIER %token RESTNAME -%token STRING %token SCM_T -%token UNSIGNED +%token SCORE_IDENTIFIER +%token STRING +%token STRING_IDENTIFIER SCM_IDENTIFIER +%token TONICNAME_PITCH +%token CHORD_MODIFIER +%token FRACTION %token REAL - -%token MARKUP -%token MARKUP_HEAD_MARKUP0 %token MARKUP_HEAD_EMPTY +%token MARKUP_HEAD_MARKUP0 %token MARKUP_HEAD_MARKUP0_MARKUP1 %token MARKUP_HEAD_SCM0 %token MARKUP_HEAD_SCM0_MARKUP1 %token MARKUP_HEAD_SCM0_SCM1 -%token MARKUP_HEAD_SCM0_SCM1_SCM2 %token MARKUP_HEAD_SCM0_SCM1_MARKUP2 - +%token MARKUP_HEAD_SCM0_SCM1_SCM2 +%token MARKUP_IDENTIFIER MARKUP_HEAD_LIST0 %token MUSIC_FUNCTION -%token MUSIC_FUNCTION_SCM %token MUSIC_FUNCTION_MUSIC -%token MUSIC_FUNCTION_SCM_MUSIC %token MUSIC_FUNCTION_MUSIC_MUSIC -%token MUSIC_FUNCTION_SCM_SCM_MUSIC +%token MUSIC_FUNCTION_SCM +%token MUSIC_FUNCTION_SCM_MUSIC %token MUSIC_FUNCTION_SCM_MUSIC_MUSIC +%token MUSIC_FUNCTION_SCM_SCM_MUSIC +%token DRUMS -%token MARKUP_IDENTIFIER MARKUP_HEAD_LIST0 -%type markup markup_line markup_list markup_list_body full_markup -%type book_block book_body -%type book_paper_head book_paper_block book_paper_body +%type book_block book_body +%type bare_int bare_unsigned %type exclamations questions dots optional_rest -%type bass_mod -%type oct_check -%type context_mod_list -%type lyric_element -%type bass_number br_bass_figure bass_figure figure_list figure_spec -%type new_lyrics -%type output_def -%type lilypond_header lilypond_header_body -%type open_event close_event +%type script_dir %type sub_quotes sup_quotes -%type toplevel_music -%type simple_element event_chord command_element +%type tremolo_type +%type bass_mod + %type Composite_music Simple_music Prefix_composite_music Generic_prefix_music -%type Generic_prefix_music_scm %type Grouped_music_list +%type Music Sequential_music Simultaneous_music %type Repeated_music -%type Alternative_music -%type tremolo_type -%type bare_int bare_unsigned -%type script_dir -%type identifier_init -%type simple_string - -%type note_chord_element chord_body chord_body_element -%type chord_body_elements -%type steno_duration optional_notemode_duration multiplied_duration - -%type post_events +%type command_req %type gen_text_def direction_less_event direction_reqd_event -%type steno_pitch pitch absolute_pitch pitch_also_in_chords -%type steno_tonic_pitch -%type duration_length fraction - -%type chord_item chord_items chord_separator new_chord -%type step_number step_numbers - -%type embedded_scm scalar -%type Music Sequential_music Simultaneous_music -%type relative_music re_rhythmed_music %type music_property_def context_change -%type context_prop_spec -%type Music_list -%type property_operation -%type context_mod context_def_mod optional_context_mod -%type music_output_def_body music_output_def_head +%type note_chord_element chord_body chord_body_element +%type open_event close_event %type post_event tagged_post_event -%type command_req +%type relative_music re_rhythmed_music +%type simple_element event_chord command_element %type string_number_event -%type string bare_number number_expression number_term number_factor -%type score_block score_body +%type toplevel_music +%type tempo_event + +%type output_def_body output_def_head +%type output_def book_paper_block +%type Music_list +%type chord_body_elements +%type chord_item chord_items chord_separator new_chord %type context_def_spec_block context_def_spec_body -%type tempo_event +%type context_mod context_def_mod optional_context_mod +%type context_prop_spec +%type duration_length fraction +%type embedded_scm scalar +%type identifier_init +%type lilypond_header lilypond_header_body +%type new_lyrics +%type post_events +%type property_operation %type script_abbreviation +%type simple_string +%type steno_pitch pitch absolute_pitch pitch_also_in_chords +%type steno_tonic_pitch +%type step_number step_numbers +%type string bare_number number_expression number_term number_factor +%type bass_number br_bass_figure bass_figure figure_list figure_spec +%type context_mod_list +%type octave_check +%type steno_duration optional_notemode_duration multiplied_duration +%type Generic_prefix_music_scm +%type lyric_element +%type Alternative_music +%type markup markup_line markup_list markup_list_body full_markup +%type score_block score_body %left '-' '+' @@ -484,10 +480,6 @@ toplevel_expression: THIS->lexer_->set_identifier (id, od->self_scm ()); scm_gc_unprotect_object (od->self_scm ()); } - | book_paper_block { - THIS->lexer_->set_identifier (ly_symbol2scm ("$defaultbookpaper"), $1->self_scm ()); - scm_gc_unprotect_object ($1->self_scm ()); - } ; toplevel_music: @@ -618,26 +610,6 @@ context_def_spec_body: ; -book_paper_block: - book_paper_body '}' { - $$ = $1; - THIS->lexer_->remove_scope (); - } - ; -book_paper_head: - BOOKPAPER '{' { - $$ = get_bookpaper (THIS); - $$->input_origin_ = THIS->here_input (); - THIS->lexer_->add_scope ($$->scope_); - } - ; - -book_paper_body: - book_paper_head - | book_paper_body assignment { } - ; - - book_block: BOOK { @@ -729,10 +701,23 @@ score_body: /* - MIDI + OUTPUT DEF */ + +book_paper_block: + output_def { + $$ = $1; + if ($$->lookup_variable (ly_symbol2scm ("is-bookpaper")) != SCM_BOOL_T) + { + THIS->parser_error (_("Need \\bookpaper for bookpaper block.")); + $$ = get_bookpaper (THIS); + } + } + ; + + output_def: - music_output_def_body '}' { + output_def_body '}' { $$ = $1; if ($1->parent_) THIS->lexer_->remove_scope (); @@ -742,8 +727,13 @@ output_def: } ; -music_output_def_head: - MIDI { +output_def_head: + BOOKPAPER { + $$ = get_bookpaper (THIS); + $$->input_origin_ = THIS->here_input (); + THIS->lexer_->add_scope ($$->scope_); + } + | MIDI { Output_def *p = get_midi (THIS); $$ = p; THIS->lexer_->add_scope (p->scope_); @@ -760,13 +750,13 @@ music_output_def_head: ; -music_output_def_body: - music_output_def_head '{' { +output_def_body: + output_def_head '{' { $$ = $1; $$->input_origin_.set_spot (THIS->here_input ()); THIS->lexer_->push_initial_state (); } - | music_output_def_head '{' MUSIC_OUTPUT_DEF_IDENTIFIER { + | output_def_head '{' OUTPUT_DEF_IDENTIFIER { scm_gc_unprotect_object ($1->self_scm ()); Output_def *o = unsmob_output_def ($3); o->input_origin_.set_spot (THIS->here_input ()); @@ -775,13 +765,13 @@ music_output_def_body: THIS->lexer_->add_scope (o->scope_); THIS->lexer_->push_initial_state (); } - | music_output_def_body assignment { + | output_def_body assignment { } - | music_output_def_body context_def_spec_block { + | output_def_body context_def_spec_block { assign_context_def ($$, $2); } - | music_output_def_body tempo_event { + | output_def_body tempo_event { /* junk this ? there already is tempo stuff in music. @@ -791,7 +781,7 @@ music_output_def_body: set_tempo ($$, d->get_length (), m); scm_gc_unprotect_object ($2->self_scm ()); } - | music_output_def_body error { + | output_def_body error { } ; @@ -1779,7 +1769,7 @@ direction_reqd_event: } ; -oct_check: +octave_check: /**/ { $$ = SCM_EOL; } | '=' { $$ = scm_int2num (0); } | '=' sub_quotes { $$ = scm_int2num ($2); } @@ -2124,7 +2114,7 @@ optional_rest: ; simple_element: - pitch exclamations questions oct_check optional_notemode_duration optional_rest { + pitch exclamations questions octave_check optional_notemode_duration optional_rest { Input i = THIS->pop_spot (); if (!THIS->lexer_->is_note_state ()) @@ -2586,7 +2576,7 @@ My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid) p = p->clone (); *destination = p->self_scm (); - return MUSIC_OUTPUT_DEF_IDENTIFIER; + return OUTPUT_DEF_IDENTIFIER; } else if (Text_item::markup_p (sid)) { *destination = sid; return MARKUP_IDENTIFIER; diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index ef38347096..ad6741cdb2 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -429,11 +429,11 @@ Piano_pedal_engraver::finalize () suicide? */ if (p->line_spanner_ - && !p->line_spanner_->live ()) + && !p->line_spanner_->is_live ()) p->line_spanner_ = 0; if (p->bracket_ - && !p->bracket_->live ()) + && !p->bracket_->is_live ()) p->bracket_ = 0; if (p->bracket_) @@ -500,10 +500,10 @@ Piano_pedal_engraver::typeset_all (Pedal_info * p) Handle suicide. */ if (p->finished_line_spanner_ - && !p->finished_line_spanner_->live ()) + && !p->finished_line_spanner_->is_live ()) p->finished_line_spanner_ = 0; if (p->finished_bracket_ - && !p->finished_bracket_->live ()) + && !p->finished_bracket_->is_live ()) p->finished_bracket_ = 0; diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index fe813adc0a..38c39dffc4 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -68,9 +68,6 @@ void Staff_symbol_engraver::acknowledge_grob (Grob_info s) { s.grob_->set_property ("staff-symbol", span_->self_scm ()); - - // remove this. probly not necessary? - s.grob_->add_dependency (span_); // UGH. UGH. UGH } diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 1ac44ca61e..84a70cc432 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -125,7 +125,7 @@ Stem_tremolo::print (SCM grob) stemdir = UP; Real beam_translation - = (beam && beam->live ()) + = (beam && beam->is_live ()) ? Beam::get_beam_translation (beam) : 0.81; diff --git a/lily/system.cc b/lily/system.cc index 48f7034236..d8485232ab 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -89,7 +89,7 @@ System::get_lines () } g->suicide (); } - else if (g->live ()) + else if (g->is_live ()) g->do_break_processing (); } diff --git a/lily/tie-column.cc b/lily/tie-column.cc index 17ea197241..c3ff0c50e6 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -154,7 +154,7 @@ Tie_column::werner_directions (Grob *me) if (ties.size () == 1) { Grob * t = ties[0]; - if (t->live () + if (t->is_live () && !get_grob_direction (t)) set_grob_direction (t,Tie::get_default_dir (t)); return ; diff --git a/scm/lily.scm b/scm/lily.scm index 3f82992e04..f5e7790917 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -100,17 +100,20 @@ ;; parser stuff. (define-public (print-music-as-book parser music) (let* ((score (ly:music-scorify music)) - (book (ly:score-bookify score))) + (head (ly:parser-lookup parser '$globalheader)) + (book (ly:score-bookify score head))) (ly:parser-print-book parser book))) (define-public (print-score-as-book parser score) - (let - ((book (ly:score-bookify score (ly:parser-lookup parser '$globalheader)))) + (let* + ((head (ly:parser-lookup parser '$globalheader)) + (book (ly:score-bookify score head))) (ly:parser-print-book parser book))) (define-public (print-score parser score) - (let ((book (ly:score-bookify score))) + (let* ((head (ly:parser-lookup parser '$globalheader)) + (book (ly:score-bookify score head))) (ly:parser-print-score parser book))) (define-public default-toplevel-music-handler print-music-as-book) -- 2.39.2