]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/input-scheme.cc
* lily/output-def-scheme.cc (LY_DEFINE): take default argument.
[lilypond.git] / lily / input-scheme.cc
index 51432ff9b9833886a645acbb757fe57b17634d25..b38b6a999b15ce0bb00c14da2c841994e139db22 100644 (file)
@@ -18,14 +18,16 @@ LY_DEFINE (ly_input, "ly:input-location?", 1, 0, 0,
   return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
-LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
-          "Print @var{msg} as a GNU compliant error message, pointing to the"
-          "location in @var{sip}.\n")
+LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM rest),
+          "Print @var{msg} as a GNU compliant error message, pointing to the "
+          "location in @var{sip}. @var{msg} is interpreted similar to @code{format}'s argument\n")
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
   SCM_ASSERT_TYPE (scm_is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
 
+  msg = scm_simple_format (SCM_BOOL_F, msg, rest);
+
   String m = ly_scm2string (msg);
   ip->message (m);