From c9212744357d0e88c85f5621720687f81d37827f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 3 Jun 2007 22:14:20 -0300 Subject: [PATCH] add support for (ly:get-option 'datadir) --- lily/program-option-scheme.cc | 12 ++++++++++-- scm/lily.scm | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index b636948fa8..638aaf634d 100644 --- a/lily/program-option-scheme.cc +++ b/lily/program-option-scheme.cc @@ -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); + + } diff --git a/scm/lily.scm b/scm/lily.scm index 48d911751a..cee1e74e80 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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.") -- 2.39.5