From 32fdbc20596f77d2f266ff64b36513d73a566be9 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 9 Jan 2007 15:29:53 +0100 Subject: [PATCH] test option help --- input/regression/option-help.ly | 3 +++ lily/program-option.cc | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 input/regression/option-help.ly diff --git a/input/regression/option-help.ly b/input/regression/option-help.ly new file mode 100644 index 0000000000..e78d04564c --- /dev/null +++ b/input/regression/option-help.ly @@ -0,0 +1,3 @@ + +#(ly:option-usage) + diff --git a/lily/program-option.cc b/lily/program-option.cc index a6ccbf9a64..fd1327622f 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -158,12 +158,11 @@ get_help_string () } LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (), - "Print ly:set-option usage") + "Print @code{ly:set-option} usage") { string help = get_help_string (); - fputs (help.c_str (), stdout); + progress_indication (help); - exit (0); return SCM_UNSPECIFIED; } @@ -194,7 +193,10 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), __FUNCTION__, "symbol"); if (ly_symbol2scm ("help") == var) - ly_option_usage (); + { + ly_option_usage (); + exit (0); + } if (val == SCM_UNDEFINED) val = SCM_BOOL_T; -- 2.39.5