]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix error message in define-markup-function
authorCarl Sorensen <c_sorensen@byu.edu>
Sat, 11 Apr 2009 19:33:23 +0000 (13:33 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 11 Apr 2009 19:33:23 +0000 (13:33 -0600)
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.

lily/general-scheme.cc
scm/markup.scm

index 8b5766387e0de808afe9c81d567c5cd9dfc16844..e0a21527b0510fa66a463a68300496d7ef78a678 100644 (file)
@@ -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;
index 89eba1a42bf93a3beee192e80398b6ac94011aa8..b0680ead52868bcbdf8ec5e4ec9b512ab341917c 100644 (file)
@@ -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))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;