X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fprogram-option-scheme.cc;h=f47abed2cc53fd1ac2448db7b41fab85ac8ee5cf;hb=665aa6046a11676fab68826fd61a99e53b704e01;hp=1efcc75a2949d164b9eb92661c635e5e10cdb6ac;hpb=a3765e1d290e5e49093e7ca7791bf3fe20be1726;p=lilypond.git diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index 1efcc75a29..f47abed2cc 100644 --- a/lily/program-option-scheme.cc +++ b/lily/program-option-scheme.cc @@ -20,6 +20,8 @@ using namespace std; #include "warn.hh" bool debug_skylines; +bool debug_property_callbacks; +bool debug_page_breaking_scoring; /* Backwards compatibility. @@ -37,8 +39,6 @@ static SCM option_hash; void internal_set_option (SCM var, SCM val) { - scm_hashq_set_x (option_hash, var, val); - if (0) ; else if (var == ly_symbol2scm ("profile-property-accesses")) @@ -88,6 +88,26 @@ void internal_set_option (SCM var, SCM val) debug_skylines = to_boolean (val); val = scm_from_bool (to_boolean (val)); } + else if (var == ly_symbol2scm ("debug-property-callbacks")) + { + debug_property_callbacks = to_boolean (val); + val = scm_from_bool (to_boolean (val)); + } + else if (var == ly_symbol2scm ("debug-page-breaking-scoring")) + { + debug_page_breaking_scoring = to_boolean (val); + val = scm_from_bool (to_boolean (val)); + } + else if (var == ly_symbol2scm ("datadir")) + { + /* ignore input value. */ + val = ly_string2scm (lilypond_datadir); + } + + + scm_hashq_set_x (option_hash, var, val); + + } @@ -129,7 +149,7 @@ get_help_string () SCM opt_help_scm = scm_object_property (sym, ly_symbol2scm ("program-option-documentation")); string opt_help = ly_scm2string (opt_help_scm); - replace_all (opt_help, + replace_all (&opt_help, string ("\n"), string ("\n") + String_convert::char_string (' ', HELP_INDENT)); @@ -148,7 +168,7 @@ get_help_string () LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (), - "Print @code{ly:set-option} usage") + "Print @code{ly:set-option} usage.") { string help = get_help_string (); progress_indication (help); @@ -199,19 +219,19 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), } LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (), - "The Scheme specified on command-line with @samp{-d}.") + "The Scheme options specified on command-line with @option{-d}.") { return ly_string2scm (init_scheme_variables_global); } LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (), - "The Scheme specified on command-line with @samp{-e}.") + "The Scheme code specified on command-line with @option{-e}.") { return ly_string2scm (init_scheme_code_global); } LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (), - "Was be_verbose_global set?") + "Was @code{be_verbose_global} set?") { return scm_from_bool (be_verbose_global); }