]> git.donarmstrong.com Git - lilypond.git/commitdiff
handle -dhelp from scheme.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 25 Jan 2007 23:35:50 +0000 (00:35 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 25 Jan 2007 23:35:50 +0000 (00:35 +0100)
lily/program-option.cc
scm/lily.scm

index 5d9bebd7382728656addb4e9e5b01ac75fe1776c..5ae59f9569b0a4c1d6a92c2b9837076b5ec1274d 100644 (file)
@@ -179,12 +179,6 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
   SCM_ASSERT_TYPE (scm_is_symbol (var), var, SCM_ARG1,
                   __FUNCTION__, "symbol");
 
-  if (ly_symbol2scm ("help") == var)
-    {
-      ly_option_usage ();
-      exit (0);
-    }
-
   if (val == SCM_UNDEFINED)
     val = SCM_BOOL_T;
 
index 69e00b4d4431f62e70c1169960f050ba0af2cb22..893cc59243f8b7ef45819aa78465878f2bf64b19 100644 (file)
@@ -45,7 +45,7 @@ ensure that all refs to parsed objects are dead.  This is an internal option, an
     (gs-load-fonts #f
                   "load fonts via Ghostscript.")
     (gui #f "running from gui; redirect stderr to log file")
-
+    (help #f "show this help.") 
     (include-book-title-preview #t "include book-titles in preview images.")
     (include-eps-fonts #t "Include fonts in separate-system EPS files.")
     (job-count #f "Process in parallel") 
@@ -638,6 +638,10 @@ The syntax is the same as `define*-public'."
          (exit 0)))))
 
 (define-public (lilypond-all files)
+  (if (ly:get-option 'help)
+      (begin
+       (ly:option-usage)
+       (exit 0)))
   (if (ly:get-option 'show-available-fonts)
       (begin
        (ly:font-config-display-fonts)