X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fprogram-option-scheme.cc;h=3934217fb3c9b64ade82becc20aaff47e036ef6d;hb=92aff321d3a7418ca972b12baf130454f6a73d7e;hp=302b48e3f48b9ec5f6dda3450c39a111f66a30c8;hpb=ce43b953f70e2b7b36e11f3cb2bb0f179fc3b1a3;p=lilypond.git diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index 302b48e3f4..3934217fb3 100644 --- a/lily/program-option-scheme.cc +++ b/lily/program-option-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2001--2012 Han-Wen Nienhuys + Copyright (C) 2001--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ using namespace std; #include "parse-scm.hh" #include "string-convert.hh" #include "warn.hh" +#include "lily-imports.hh" bool debug_skylines; bool debug_property_callbacks; @@ -136,7 +137,6 @@ static string get_help_string () { SCM alist = ly_hash2alist (option_hash); - SCM converter = ly_lily_module_constant ("scm->string"); vector opts; @@ -147,7 +147,7 @@ get_help_string () string opt_spec = String_convert::char_string (' ', INDENT) + ly_symbol2string (sym) + " (" - + ly_scm2string (scm_call_1 (converter, val)) + + ly_scm2string (Lily::scm_to_string (val)) + ")"; if (opt_spec.length () + SEPARATION > HELP_INDENT) @@ -208,7 +208,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), { LY_ASSERT_TYPE (ly_is_symbol, var, 1); - if (val == SCM_UNDEFINED) + if (SCM_UNBNDP (val)) val = SCM_BOOL_T; string varstr = robust_symbol2string (var, ""); @@ -219,7 +219,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), } SCM handle = scm_hashq_get_handle (option_hash, var); - if (handle == SCM_BOOL_F) + if (scm_is_false (handle)) warning (_f ("no such internal option: %s", varstr.c_str ())); internal_set_option (var, val);