]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/output-def-scheme.cc
Run `make grand-replace'.
[lilypond.git] / lily / output-def-scheme.cc
index ea216a371fc3ae5ad63d36a31e1f2ef06f8e2564..7a44a0d0824af53de2acb6bb7621f0c1beb5b053 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "output-def.hh"
@@ -16,8 +16,9 @@
 
 LY_DEFINE (ly_output_def_lookup, "ly:output-def-lookup",
           2, 1, 0, (SCM pap, SCM sym, SCM def),
-          "Lookup @var{sym} in the Output_def @var{pap}. "
-          "Return the value or @var{def} (which defaults to  @code{'()}) if undefined.")
+          "Look up @var{sym} in the @var{pap} output definition"
+          " (e.g., @code{\\paper}).  Return the value or @var{def}"
+          " (which defaults to @code{'()}) if undefined.")
 {
   LY_ASSERT_SMOB (Output_def, pap, 1);
   Output_def *op = unsmob_output_def (pap);
@@ -46,16 +47,27 @@ LY_DEFINE (ly_output_def_scope, "ly:output-def-scope",
 
 LY_DEFINE (ly_output_def_parent, "ly:output-def-parent",
           1, 0, 0, (SCM def),
-          "Get the parent output-def of @var{def}.")
+          "Get the parent output definition of @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
   Output_def *op = unsmob_output_def (def);
   return op->parent_ ? op->parent_->self_scm () : SCM_EOL;
 }
 
+LY_DEFINE (ly_output_def_set_variable_x, "ly:output-def-set-variable!",
+           3, 0, 0, (SCM def, SCM sym, SCM val),
+           "Set an output definition @var{def} variable @var{sym} to @var{val}.")
+{
+  LY_ASSERT_SMOB (Output_def, def, 1);
+  Output_def *output_def = unsmob_output_def (def);
+  LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
+  output_def->set_variable (sym, val);
+  return SCM_UNSPECIFIED;
+}
+
 LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
           1, 0, 0, (SCM def),
-          "Clone @var{def}.")
+          "Clone output definition @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
   Output_def *op = unsmob_output_def (def);
@@ -91,7 +103,7 @@ LY_DEFINE (ly_output_def_p, "ly:output-def?",
 
 LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
           1, 0, 0, (SCM bp),
-          "Get output-scale for BP.")
+          "Get output-scale for @var{bp}.")
 {
   LY_ASSERT_SMOB (Output_def, bp, 1);
   Output_def *b = unsmob_output_def (bp);
@@ -100,7 +112,7 @@ LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
 
 LY_DEFINE (ly_make_output_def, "ly:make-output-def",
           0, 0, 0, (),
-          "Make a output def.")
+          "Make an output definition.")
 {
   Output_def *bp = new Output_def;
   return bp->unprotect ();
@@ -108,11 +120,9 @@ LY_DEFINE (ly_make_output_def, "ly:make-output-def",
 
 LY_DEFINE (ly_paper_get_font, "ly:paper-get-font", 2, 0, 0,
           (SCM paper_smob, SCM chain),
-
-          "Return a font metric satisfying the font-qualifiers "
-          "in the alist chain @var{chain}.\n"
-          "(An alist chain is a list of alists, "
-          "containing grob properties).\n")
+          "Return a font metric satisfying the font-qualifiers"
+          " in the alist chain @var{chain}.  (An alist chain is a"
+          " list of alists, containing grob properties.)")
 {
   LY_ASSERT_SMOB (Output_def, paper_smob, 1);
 
@@ -125,7 +135,6 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
           (SCM layout_smob, SCM name),
           "Return the layout variable @var{name}.")
 {
   LY_ASSERT_SMOB (Output_def, layout_smob, 1);
   Output_def *layout = unsmob_output_def (layout_smob);
   return scm_from_double (layout->get_dimension (name));