X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparse-scm.cc;h=576591dc97265e2a77dd93bcfa7c61b7ee48ecba;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=c83866849fd164c9597b6b29d80347ff69b1bcae;hpb=906b0e079785805e6cdf564c447460d958f6f6f9;p=lilypond.git diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index c83866849f..576591dc97 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -28,6 +28,7 @@ using namespace std; #include "main.hh" #include "paper-book.hh" #include "source-file.hh" +#include "lily-imports.hh" /* Pass string to scm parser, read one expression. Return result value and #chars read. @@ -94,8 +95,7 @@ internal_ly_eval_scm (Parse_start *ps) static SCM module = SCM_BOOL_F; if (scm_is_false (module)) { - SCM function = ly_lily_module_constant ("make-safe-lilypond-module"); - module = scm_gc_protect_object (scm_call_0 (function)); + module = scm_gc_protect_object (Lily::make_safe_lilypond_module ()); } return scm_eval (ps->form_, module); @@ -120,7 +120,8 @@ parse_handler (void *data, SCM /*tag*/, SCM args) { Parse_start *ps = (Parse_start *) data; - ps->location_.error (_ ("GUILE signaled an error for the expression beginning here")); + ps->location_.non_fatal_error + (_ ("GUILE signaled an error for the expression beginning here")); if (scm_ilength (args) > 2) scm_display_error_message (scm_cadr (args), scm_caddr (args), scm_current_error_port ()); @@ -174,7 +175,7 @@ ly_eval_scm (SCM form, Input i, bool safe, Lily_parser *parser) Parse_start ps (form, i, safe, parser); SCM ans = scm_c_with_fluid - (ly_lily_module_constant ("%location"), + (Lily::f_location, i.smobbed_copy (), parse_protect_global ? protected_ly_eval_scm : catch_protected_eval_body, (void *) &ps);