]> git.donarmstrong.com Git - lilypond.git/commitdiff
test option help
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 9 Jan 2007 14:29:53 +0000 (15:29 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 9 Jan 2007 14:29:53 +0000 (15:29 +0100)
input/regression/option-help.ly [new file with mode: 0644]
lily/program-option.cc

diff --git a/input/regression/option-help.ly b/input/regression/option-help.ly
new file mode 100644 (file)
index 0000000..e78d045
--- /dev/null
@@ -0,0 +1,3 @@
+
+#(ly:option-usage)
+
index a6ccbf9a64cf5072fc02e14d1c90dc7c63e92881..fd1327622f45b22e7e23c321d95c4b2209b5a05f 100644 (file)
@@ -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;