From fa8b518b306fc5a1acd9a408b8c31f050f23b597 Mon Sep 17 00:00:00 2001 From: Carl Sorensen Date: Sat, 11 Apr 2009 13:33:23 -0600 Subject: [PATCH] Fix error message in define-markup-function There was a syntax error in markup.scm Also, ly_error would not pass the arguments to simple-format properly if rest was a list in the scheme side (as in define-markup-function). Therefore, if the format args are a list, get the car of rest in ly_error so the args can be passed properly. (cherry picked from commit bc41f1ab4e112d7a75f7d3feb62589124d283fec) --- lily/general-scheme.cc | 2 ++ scm/markup.scm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index 8b5766387e..e0a21527b0 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -88,6 +88,8 @@ LY_DEFINE (ly_error, "ly:error", " The error is formatted with @code{format} and @var{rest}.") { LY_ASSERT_TYPE (scm_is_string, str, 1); + if (scm_is_pair(scm_car(rest))) + rest=scm_car(rest); str = scm_simple_format (SCM_BOOL_F, str, rest); error (ly_scm2string (str)); return SCM_UNSPECIFIED; diff --git a/scm/markup.scm b/scm/markup.scm index 89eba1a42b..b0680ead52 100644 --- a/scm/markup.scm +++ b/scm/markup.scm @@ -207,8 +207,8 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function. (ly:error (string-append make-name ": " - (_ "Invalid argument in position ~A. Expect: ~A, found: ~S.") - error-msg)) + (_ "Invalid argument in position ~A. Expect: ~A, found: ~S.")) + error-msg) (cons markup-function args)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.39.2