From: Han-Wen Nienhuys Date: Mon, 29 Jul 2002 23:32:10 +0000 (+0000) Subject: parse scm fixes X-Git-Tag: release/1.5.72~84 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=55cd77586b5c96789e3726d788ae532aaea68125;p=lilypond.git parse scm fixes --- diff --git a/ChangeLog b/ChangeLog index bfa215065a..c306d2c931 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-07-30 Han-Wen + + * lily/parse-scm.cc (parse_handler): add better error message, + return a sensible number of nchars + 2002-07-29 Han-Wen Nienhuys * lily/parse-scm.cc (protected_ly_parse_scm): catch GUILE errors diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index e5228d945c..66f46482e5 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -79,8 +79,15 @@ parse_handler (void * data, SCM tag, SCM args) ps->start_location.error (_("GUILE signaled an error for the expression begining here")); - gh_display (args); - gh_newline(); + if (scm_ilength (args) > 2) + scm_display_error_message (gh_cadr (args), gh_caddr(args), scm_current_error_port()); + + /* + The following is a kludge; we should probably search for + [a-z][0-9] a note, and start before that. + */ + ps->nchars = 1; + return SCM_EOL; }