diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-01-25 16:05:38 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-01-25 16:05:38 +0000 |
commit | 7556e96abb66c88ae653c96898bcad2c3f18b645 (patch) | |
tree | 6cd8ad3d78c546d50fd36bba6719732a3db7e767 | |
parent | 08bfc5231f319373ded486c5d99fbebc428b9415 (diff) |
* scm/layout-page-layout.scm (write-page-breaks): record tweaks
for different \score blocks separately.
(post-process-pages): put write-page-layout into paper block.
* lily/output-def.cc (get_parser): new file.
* lily/output-def-scheme.cc (LY_DEFINE): ly:output-def-parser, new
file.
* lily/include/output-def.hh (class Output_def): add parser_ member.
* input/regression/page-layout-twopass.ly (Module): new file.
* scm/lily.scm: remove cpp hack.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | input/regression/page-layout-twopass.ly | 32 | ||||
-rw-r--r-- | lily/book.cc | 1 | ||||
-rw-r--r-- | lily/context.cc | 10 | ||||
-rw-r--r-- | lily/global-context-scheme.cc | 8 | ||||
-rw-r--r-- | lily/grob-scheme.cc | 5 | ||||
-rw-r--r-- | lily/grob.cc | 6 | ||||
-rw-r--r-- | lily/include/context.hh | 2 | ||||
-rw-r--r-- | lily/include/lily-proto.hh | 1 | ||||
-rw-r--r-- | lily/include/object-key.hh | 2 | ||||
-rw-r--r-- | lily/include/output-def.hh | 9 | ||||
-rw-r--r-- | lily/include/paper-score.hh | 3 | ||||
-rw-r--r-- | lily/include/score.hh | 4 | ||||
-rw-r--r-- | lily/include/system.hh | 1 | ||||
-rw-r--r-- | lily/lily-parser-scheme.cc | 1 | ||||
-rw-r--r-- | lily/lily-parser.cc | 5 | ||||
-rw-r--r-- | lily/lilypond-key.cc | 3 | ||||
-rw-r--r-- | lily/object-key-dumper.cc | 8 | ||||
-rw-r--r-- | lily/object-key.cc | 5 | ||||
-rw-r--r-- | lily/output-def-scheme.cc | 17 | ||||
-rw-r--r-- | lily/output-def.cc | 11 | ||||
-rw-r--r-- | lily/paper-outputter.cc | 1 | ||||
-rw-r--r-- | lily/paper-score.cc | 2 | ||||
-rw-r--r-- | lily/parser.yy | 2 | ||||
-rw-r--r-- | lily/score-engraver.cc | 1 | ||||
-rw-r--r-- | lily/score.cc | 11 | ||||
-rw-r--r-- | lily/system.cc | 10 | ||||
-rw-r--r-- | scm/framework-ps.scm | 1 | ||||
-rw-r--r-- | scm/layout-page-layout.scm | 62 | ||||
-rw-r--r-- | scm/lily.scm | 8 |
30 files changed, 189 insertions, 60 deletions
@@ -1,5 +1,20 @@ 2006-01-25 Han-Wen Nienhuys <hanwen@xs4all.nl> + * scm/layout-page-layout.scm (write-page-breaks): record tweaks + for different \score blocks separately. + (post-process-pages): put write-page-layout into paper block. + + * lily/output-def.cc (get_parser): new file. + + * lily/output-def-scheme.cc (LY_DEFINE): ly:output-def-parser, new + file. + + * lily/include/output-def.hh (class Output_def): add parser_ member. + + * input/regression/page-layout-twopass.ly (Module): new file. + + * scm/lily.scm: remove cpp hack. + * lily/lyric-engraver.cc (get_voice_to_lyrics): use NPOS everywhere. 2006-01-25 Jan Nieuwenhuizen <janneke@gnu.org> @@ -16,7 +31,7 @@ * flower/interval.cc: * flower/include/interval.hh: - + * flower/string-convert.cc: * flower/include/string-convert.hh: Use std::string [interface]. Update callers. diff --git a/input/regression/page-layout-twopass.ly b/input/regression/page-layout-twopass.ly new file mode 100644 index 0000000000..c820b9a226 --- /dev/null +++ b/input/regression/page-layout-twopass.ly @@ -0,0 +1,32 @@ +blabla = { +\break +\pageBreak +\spacingTweaks #'((system-Y-extent -11.050006 . 0.0) + (system-refpoint-Y-extent -4.0 . -4.0) + (system-index . 0) + (page-system-count . 3) + (page-printable-height . 148.438777952756) + (page-space-left . -47.1596563937008)) + + +\skip 1*2/1\grace { \skip 1*1/16 } +\break +\spacingTweaks #'((system-Y-extent -11.050006 . 0.347445669291338) + (system-refpoint-Y-extent -4.0 . -4.0) + (system-index . 1) + (page-system-count . 3) + (page-printable-height . 148.438777952756) + (page-space-left . -47.1596563937008)) + + +\skip 1*1/1 +\break +\spacingTweaks #'((system-Y-extent -8.0 . 0.313302362204724) + (system-refpoint-Y-extent -4.0 . -4.0) + (system-index . 2) + (page-system-count . 3) + (page-printable-height . 148.438777952756) + (page-space-left . -47.1596563937008)) + + +}
\ No newline at end of file diff --git a/lily/book.cc b/lily/book.cc index 1d6edde999..58972afa7c 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -81,6 +81,7 @@ Book::add_score (SCM s) scores_ = scm_cons (s, scores_); } + /* Concatenate all score outputs into a Paper_book */ Paper_book * diff --git a/lily/context.cc b/lily/context.cc index 852303f25d..e2d597b15a 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -264,6 +264,16 @@ Context::get_grob_key (String name) if (!use_object_keys) return 0; + return create_grob_key (name); +} + +/* + We want to have a key for some objects anyway, so we can invent a + unique identifier for each (book,score) tuple. +*/ +Object_key const * +Context::create_grob_key (String name) +{ int disambiguation_count = 0; if (grob_counts_.find (name) != grob_counts_.end ()) disambiguation_count = grob_counts_[name]; diff --git a/lily/global-context-scheme.cc b/lily/global-context-scheme.cc index bb2c60ab08..115b7f180b 100644 --- a/lily/global-context-scheme.cc +++ b/lily/global-context-scheme.cc @@ -36,8 +36,8 @@ LY_DEFINE (ly_run_translator, "ly:run-translator", "An interpretation context is set up,\n" "and @var{mus} is interpreted with it. \n" "The context is returned in its final state.\n" - - "\n\nOptionally, this routine takes an Object-key to\n" + "\n\n" + "Optionally, this routine takes an Object-key to\n" "to uniquely identify the Score block containing it.\n") { Output_def *odef = unsmob_output_def (output_def); @@ -56,7 +56,8 @@ LY_DEFINE (ly_run_translator, "ly:run-translator", Cpu_timer timer; - Global_context *trans = new Global_context (odef, music->get_length (), unsmob_key (key)); + Global_context *trans = new Global_context (odef, music->get_length (), + unsmob_key (key)); if (!trans) { programming_error ("no toplevel translator"); @@ -68,7 +69,6 @@ LY_DEFINE (ly_run_translator, "ly:run-translator", SCM protected_iter = Music_iterator::get_static_get_iterator (music); Music_iterator *iter = unsmob_iterator (protected_iter); iter->init_translator (music, trans); - iter->construct_children (); if (!iter->ok ()) diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 15cf075a25..ee88f2ac48 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -14,7 +14,7 @@ #include "output-def.hh" #include "system.hh" #include "font-interface.hh" - +#include "paper-score.hh" LY_DEFINE (ly_grob_property_data, "ly:grob-property-data", @@ -254,7 +254,8 @@ LY_DEFINE (ly_grob_key, "ly:grob-key", { Grob *me = unsmob_grob (grob); SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "Grob"); - return me->key ()->self_scm (); + + return me->key () ? me->key ()->self_scm () : SCM_EOL; } LY_DEFINE (ly_grob_default_font, "ly:grob-default-font", diff --git a/lily/grob.cc b/lily/grob.cc index 402f9dfc87..cb3f90467c 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -15,7 +15,6 @@ #include "warn.hh" #include "pointer-group-interface.hh" #include "misc.hh" -#include "paper-score.hh" #include "stencil.hh" #include "warn.hh" #include "system.hh" @@ -24,14 +23,9 @@ #include "misc.hh" #include "music.hh" #include "item.hh" -#include "paper-score.hh" #include "ly-smobs.icc" #include "output-def.hh" - - - - Grob * Grob::clone (int count) const { diff --git a/lily/include/context.hh b/lily/include/context.hh index 363833a4c6..36ffd924a8 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -50,6 +50,8 @@ protected: public: Object_key const *key () const { return key_; } + + Object_key const *create_grob_key (String); Object_key const *get_grob_key (String); Object_key const *get_context_key (String, String); diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index da0f30e1f6..5693b42059 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -72,6 +72,7 @@ class Keyword_table; class Ligature_bracket_engraver; class Ligature_engraver; class Lily_lexer; +class Lily_parser; class Lilypond_context_key; class Lilypond_grob_key; class Line_group_engraver_group; diff --git a/lily/include/object-key.hh b/lily/include/object-key.hh index 8cd5803d30..f61862599b 100644 --- a/lily/include/object-key.hh +++ b/lily/include/object-key.hh @@ -27,8 +27,8 @@ protected: virtual void derived_mark () const; virtual int get_type () const; virtual int do_compare (Object_key const *other) const; - virtual SCM as_scheme () const; public: + virtual SCM as_scheme () const; static Object_key *from_scheme (SCM); static Object_key *undump (SCM); int compare (Object_key const *other) const; diff --git a/lily/include/output-def.hh b/lily/include/output-def.hh index b0b4c71303..bf9d23f934 100644 --- a/lily/include/output-def.hh +++ b/lily/include/output-def.hh @@ -38,18 +38,23 @@ */ class Output_def { + public: VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def); DECLARE_SMOBS (Output_def, ); public: SCM scope_; - Output_def * parent_; + Output_def *parent_; + Input input_origin_; String user_key_; + Lily_parser *parser_; + Lily_parser *get_parser () const; + Output_def (Output_def const&); Output_def (); - + /* variables. */ diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh index a117bb74e7..f12d214de2 100644 --- a/lily/include/paper-score.hh +++ b/lily/include/paper-score.hh @@ -19,10 +19,9 @@ class Paper_score : public Music_output System *system_; SCM systems_; SCM paper_systems_; - public: Paper_score (Output_def *); - + DECLARE_CLASSNAME(Paper_score); Output_def *layout () const; diff --git a/lily/include/score.hh b/lily/include/score.hh index 4af2d552e9..2e1724a35d 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -24,15 +24,17 @@ class Score : public Input SCM music_; public: - String user_key_; Link_array<Output_def> defs_; + String user_key_; SCM header_; bool error_found_; Score (); Score (Score const &); + SCM get_music () const; + void add_output_def (Output_def *def); void set_music (SCM music); SCM book_rendering (Output_def *, Output_def *, Object_key *); }; diff --git a/lily/include/system.hh b/lily/include/system.hh index ce6f69fee6..35a0ca2713 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -26,6 +26,7 @@ class System : public Spanner Paper_score *pscore_; // ugh. public: + Paper_score *paper_score () const; int get_rank () const; void post_processing (); SCM get_paper_system (); diff --git a/lily/lily-parser-scheme.cc b/lily/lily-parser-scheme.cc index e9d533e91e..6d615ea915 100644 --- a/lily/lily-parser-scheme.cc +++ b/lily/lily-parser-scheme.cc @@ -227,3 +227,4 @@ LY_DEFINE (ly_parser_output_name, "ly:parser-output-name", return scm_makfrom0str (p->output_basename_.c_str ()); } + diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 5e4aede18c..7ede1f2e7a 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -194,7 +194,8 @@ get_layout (Lily_parser *parser) Output_def *layout = unsmob_output_def (id); layout = layout ? layout->clone () : new Output_def; layout->set_variable (ly_symbol2scm ("is-layout"), SCM_BOOL_T); - + layout->parser_ = parser; + return layout; } @@ -205,6 +206,7 @@ get_midi (Lily_parser *parser) Output_def *layout = unsmob_output_def (id); layout = layout ? layout->clone () : new Output_def; layout->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T); + layout->parser_ = parser; return layout; } @@ -216,6 +218,7 @@ get_paper (Lily_parser *parser) layout = layout ? dynamic_cast<Output_def *> (layout->clone ()) : new Output_def; layout->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T); + layout->parser_ = parser; return layout; } diff --git a/lily/lilypond-key.cc b/lily/lilypond-key.cc index d9833307af..ecdb9f4b4c 100644 --- a/lily/lilypond-key.cc +++ b/lily/lilypond-key.cc @@ -22,7 +22,8 @@ Lilypond_grob_key::Lilypond_grob_key (Object_key const *context, void Lilypond_grob_key::derived_mark () const { - scm_gc_mark (context_->self_scm ()); + if (context_) + scm_gc_mark (context_->self_scm ()); } // todo: reverse order of comparison for efficiency reasons. diff --git a/lily/object-key-dumper.cc b/lily/object-key-dumper.cc index 8b51037e44..204097f4b4 100644 --- a/lily/object-key-dumper.cc +++ b/lily/object-key-dumper.cc @@ -57,11 +57,9 @@ Object_key_dumper::serialize_key (Object_key const *key) if (Object_key const *sub_key = unsmob_key (scm_car (s))) scm_set_car_x (s, dump_key (sub_key)); else if (Moment *mom = unsmob_moment (scm_car (s))) - { - scm_set_car_x (s, - scm_list_2 (ly_symbol2scm ("unquote"), - mom->as_scheme ())); - } + scm_set_car_x (s, + scm_list_2 (ly_symbol2scm ("unquote"), + mom->as_scheme ())); } file_contents_ = scm_cons (scm_list_3 (ly_symbol2scm ("define-key"), diff --git a/lily/object-key.cc b/lily/object-key.cc index 4334e4f44b..50e42027ef 100644 --- a/lily/object-key.cc +++ b/lily/object-key.cc @@ -155,7 +155,9 @@ Copied_key::derived_mark () const SCM Copied_key::as_scheme () const { - return scm_list_2 (original_ ? original_->self_scm () : SCM_BOOL_F, scm_from_int (copy_count_)); + return scm_list_2 (original_ + ? original_->self_scm () + : SCM_BOOL_F, scm_from_int (copy_count_)); } Object_key * @@ -164,3 +166,4 @@ Copied_key::from_scheme (SCM a) return new Copied_key (unsmob_key (scm_car (a)), scm_to_int (scm_list_ref (a, scm_from_int (1)))); } + diff --git a/lily/output-def-scheme.cc b/lily/output-def-scheme.cc index fbd32e9230..b0ead00598 100644 --- a/lily/output-def-scheme.cc +++ b/lily/output-def-scheme.cc @@ -12,6 +12,7 @@ #include "output-def.hh" #include "ly-module.hh" #include "context-def.hh" +#include "lily-parser.hh" LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup", 2, 1, 0, (SCM pap, SCM sym, SCM def), @@ -70,7 +71,6 @@ LY_DEFINE (ly_output_description, "ly:output-description", Output_def *id = unsmob_output_def (output_def); SCM al = ly_module2alist (id->scope_); - SCM ell = SCM_EOL; for (SCM s = al; scm_is_pair (s); s = scm_cdr (s)) { @@ -98,6 +98,21 @@ LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale", return scm_from_double (output_scale (b)); } +/* + Cannot put in scope, but need a separate function, since we don't + want to allow this in --safe. + */ +LY_DEFINE (ly_output_def_parser, "ly:output-def-parser", + 1, 0, 0, (SCM odef), + "Return the parser where @var{odef} is coming from.") +{ + Output_def *b = unsmob_output_def (odef); + SCM_ASSERT_TYPE (b, odef, SCM_ARG1, __FUNCTION__, "paper"); + + return b->get_parser()->self_scm (); +} + + LY_DEFINE (ly_make_output_def, "ly:make-output-def", 0, 0, 0, (), "Make a output def.") diff --git a/lily/output-def.cc b/lily/output-def.cc index bb40a4d72c..eda08dd7b4 100644 --- a/lily/output-def.cc +++ b/lily/output-def.cc @@ -26,9 +26,11 @@ Output_def::Output_def () { scope_ = SCM_EOL; + parser_ = 0; parent_ = 0; - smobify_self (); + smobify_self (); + scope_ = ly_make_anonymous_module (false); } @@ -36,6 +38,7 @@ Output_def::Output_def (Output_def const &s) { scope_ = SCM_EOL; parent_ = 0; + parser_ = s.parser_; smobify_self (); input_origin_ = s.input_origin_; @@ -51,6 +54,12 @@ Output_def::~Output_def () IMPLEMENT_SMOBS (Output_def); IMPLEMENT_DEFAULT_EQUAL_P (Output_def); +Lily_parser * +Output_def::get_parser () const +{ + return parent_ ? parent_->get_parser () : parser_; +} + SCM Output_def::mark_smob (SCM m) { diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 7a39af91d5..bbefe954f9 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -11,6 +11,7 @@ #include <cmath> #include <ctime> + using namespace std; #include "dimensions.hh" diff --git a/lily/paper-score.cc b/lily/paper-score.cc index c34e80c502..9e93234909 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -7,7 +7,7 @@ */ #include "paper-score.hh" - +#include "book.hh" #include "all-font-metrics.hh" #include "gourlay-breaking.hh" #include "main.hh" diff --git a/lily/parser.yy b/lily/parser.yy index efd69b9150..dcba6806ce 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -703,7 +703,7 @@ score_body: } else { - $$->defs_.push ($2); + $$->add_output_def ($2); } $2->unprotect (); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index e45a99676c..94d269df9f 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -78,6 +78,7 @@ Score_engraver::initialize () Object_key const *sys_key = context ()->get_grob_key ("System"); pscore_->typeset_system (new System (props, sys_key)); + system_ = pscore_->root_system (); context ()->set_property ("rootSystem", system_->self_scm ()); diff --git a/lily/score.cc b/lily/score.cc index ff5c153cd6..505a1fee5e 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -9,6 +9,7 @@ #include "score.hh" #include <cstdio> + using namespace std; #include "book.hh" @@ -22,8 +23,8 @@ using namespace std; #include "paper-book.hh" #include "paper-score.hh" #include "warn.hh" - #include "music.hh" + #include "ly-smobs.icc" Score::Score () @@ -119,7 +120,7 @@ default_rendering (SCM music, SCM outdef, } SCM context = ly_run_translator (music, scaled_def, key); - + SCM output_as_scm = ly_format_output (context); Music_output *output = unsmob_music_output (output_as_scm); @@ -231,3 +232,9 @@ Score::get_music () const { return music_; } + +void +Score::add_output_def (Output_def *def) +{ + defs_.push (def); +} diff --git a/lily/system.cc b/lily/system.cc index 07d156a65b..147d85c863 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -374,8 +374,6 @@ System::get_paper_system () scm_cons (ly_symbol2scm ("combine-stencil"), exprs)); - - Grob *left_bound = this->get_bound (LEFT); SCM prop_init = left_bound->get_property ("line-break-system-details"); Prob *pl = make_paper_system (prop_init); @@ -455,6 +453,12 @@ System::columns () const return columns; } +Paper_score* +System::paper_score () const +{ + return pscore_; +} + int System::get_rank () const { @@ -472,6 +476,8 @@ get_root_system (Grob *me) return dynamic_cast<System*> (system_grob); } + + ADD_INTERFACE (System, "system-interface", "This is the toplevel object: each object in a score " "ultimately has a System object as its X and Y parent. ", diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 7115326207..6ec77e7ad4 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -530,6 +530,7 @@ (postprocess-output book framework-ps-module (format "~a.preview.eps" basename) (cons "png" (ly:output-formats))))) + (if #f (define-public (output-preview-framework basename book scopes fields) diff --git a/scm/layout-page-layout.scm b/scm/layout-page-layout.scm index 96b1265d4a..812e4bc044 100644 --- a/scm/layout-page-layout.scm +++ b/scm/layout-page-layout.scm @@ -11,22 +11,36 @@ (scm page) ) + (define (write-page-breaks pages) "Dump page breaks" - - (define tweaks '()) + (define tweaks (make-hash-table 23)) + + (define (record what property-pairs) + (let* + ((key (ly:output-def-lookup (ly:grob-layout what) + 'tweak-key + "tweaks" + )) + (when (ly:grob-property what 'when)) + ) + + (if (not (hash-ref tweaks key)) + (hash-set! tweaks key '())) + + (hash-set! tweaks key + (acons when property-pairs + (hash-ref tweaks key))) + + )) - (define (record when property-pairs) - (set! tweaks - (acons when property-pairs - tweaks))) (define (graceless-moment mom) (ly:make-moment (ly:moment-main-numerator mom) (ly:moment-main-denominator mom) 0 0)) - + (define (moment->skip mom) (let* ((main (if (> (ly:moment-main-numerator mom) 0) @@ -71,7 +85,24 @@ (format out-port "~a\n~a\n" skip base) (dump-tweaks out-port (cdr tweak-list) (graceless-moment now)) ))) - + + (define (dump-all-tweaks) + (let* + ((paper (ly:paper-book-paper (page-property (car pages) 'paper-book))) + (parser (ly:output-def-parser paper)) + (name (format "~a-page-layout.ly" + (ly:parser-output-name parser))) + (out-port (open-output-file name))) + + (ly:progress "Writing page layout to ~a" name) + (hash-for-each + (lambda (key val) + (format out-port "~a = {" key) + (dump-tweaks out-port (reverse val) (ly:make-moment 0 1)) + (display "}" out-port)) + tweaks) + )) + (define (handle-page page) (define index 0) (define (handle-system sys) @@ -90,8 +121,8 @@ (set! props (cons '(page-break . #t) props))) (if (not (ly:prob-property? sys 'is-title)) - (record (ly:grob-property (ly:spanner-bound (ly:prob-property sys 'system-grob) LEFT) 'when) - props)) + (record (ly:spanner-bound (ly:prob-property sys 'system-grob) LEFT) + props)) (set! index (1+ index)) )) @@ -99,19 +130,12 @@ (for-each handle-page pages) - - (let* - ((out-port (open-output-file "breaks.ly"))) - - (display "{" out-port) - (dump-tweaks out-port (reverse tweaks) (ly:make-moment 0 1)) - (display "}" out-port) - )) + (dump-all-tweaks)) (define (post-process-pages layout pages) - (if (ly:get-option 'write-page-layout) + (if (ly:output-def-lookup layout 'write-page-layout) (write-page-breaks pages))) diff --git a/scm/lily.scm b/scm/lily.scm index 7ef7c147d2..2689bbcb85 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -34,10 +34,9 @@ similar to chord syntax") (verbose ,(ly:command-line-verbose?) "value for the --verbose flag") (ttf-verbosity 0 "how much verbosity for TTF font embedding?") - (write-page-layout #f - "dump page layout settings.") (debug-gc #f - "dump GC protection info")))) + "dump GC protection info")) + )) ;; FIXME: stray statement (define-scheme-options) @@ -88,9 +87,6 @@ similar to chord syntax") -;; cpp hack to get useful error message -(define ifdef "First run this through cpp.") -(define ifndef "First run this through cpp.") ;; gettext wrapper for guile < 1.7.2 (if (defined? 'gettext) |