]> git.donarmstrong.com Git - lilypond.git/commitdiff
add support for (ly:get-option 'datadir)
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jun 2007 01:14:20 +0000 (22:14 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jun 2007 01:14:20 +0000 (22:14 -0300)
lily/program-option-scheme.cc
scm/lily.scm

index b636948fa84c8490cb556ebf559a6204fc9dafd6..638aaf634d96fca8d61646e5cacad400bacb7764 100644 (file)
@@ -39,8 +39,6 @@ static SCM option_hash;
 
 void internal_set_option (SCM var, SCM val)
 {
-  scm_hashq_set_x (option_hash, var, val);
-
   if (0)
     ;
   else if (var == ly_symbol2scm ("profile-property-accesses"))
@@ -100,6 +98,16 @@ void internal_set_option (SCM var, SCM val)
       debug_page_breaking_scoring = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("datadir"))
+    {
+      /* ignore input value. */
+      val = ly_string2scm (lilypond_datadir);
+    }
+
+
+  scm_hashq_set_x (option_hash, var, val);
+
+
 }
 
 
index 48d911751aff6fbda380a2a6f4c735cc5e960704..cee1e74e800423d72e25d75e1985556638e09c38 100644 (file)
@@ -31,6 +31,7 @@
     (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg, tex, texstr)")
     (check-internal-types #f "check every property assignment for types")
     (clip-systems #f "Generate cut-out snippets of a score")
+    (datadir #f "LilyPond prefix for data files (Readonly).")
     (debug-gc #f "dump memory debugging statistics")
     (debug-gc-assert-parsed-dead #f "for memory debugging:
 ensure that all refs to parsed objects are dead.  This is an internal option, and is switched on automatically for -ddebug-gc.")