From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Tue, 9 Jan 2007 14:29:53 +0000 (+0100)
Subject: test option help
X-Git-Tag: release/2.11.11-1~39
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=32fdbc20596f77d2f266ff64b36513d73a566be9;p=lilypond.git

test option help
---

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;