]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/program-option-scheme.cc
Fix whitespace of files in Documentation/misc.
[lilypond.git] / lily / program-option-scheme.cc
index 0a6c3a80dc66ba006772271da0ebb3060e5bad18..820faf5bfea907bc0f2870001261a036ad12b79e 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2001--2011  Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2001--2012  Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -65,11 +65,6 @@ internal_set_option (SCM var,
       profile_property_accesses = valbool;
       val = val_scm_bool;
     }
-  else if (varstr == "point-and-click")
-    {
-      point_and_click_global = valbool;
-      val = val_scm_bool;
-    }
   else if (varstr == "protected-scheme-parsing")
     {
       parse_protect_global = valbool;
@@ -128,7 +123,11 @@ internal_set_option (SCM var,
       val = val_scm_bool;
     }
   else if (varstr == "warning-as-error")
-    val = val_scm_bool;
+    {
+      /* warning_as_error is defined in flower/warn.cc */
+      warning_as_error = valbool;
+      val = val_scm_bool;
+    }
   else if (varstr == "music-strings-to-paths")
     {
       music_strings_to_paths = valbool;
@@ -188,12 +187,12 @@ get_help_string ()
   return help;
 }
 
-LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
-           "Print @code{ly:set-option} usage.")
+LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 1, 0, (SCM port),
+           "Print @code{ly:set-option} usage.  Optional @var{port} argument"
+          "for the destination defaults to current output port.")
 {
-  string help = get_help_string ();
-  puts (help.c_str ());
-  fflush (stdout);
+  SCM str = scm_from_locale_string (get_help_string ().c_str ());
+  scm_write_line (str, port);
 
   return SCM_UNSPECIFIED;
 }