]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-scheme.cc
*** empty log message ***
[lilypond.git] / lily / context-scheme.cc
index 3d26ef368c50f1b6853bf7d175acd2c6d1cffb02..6ebb4fcac0639b014c6e0d8d595a8098d171186b 100644 (file)
@@ -19,7 +19,7 @@ LY_DEFINE (ly_context_id, "ly:context-id",
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
 
-  return scm_makfrom0str (tr->id_string (). to_str0 ());
+  return scm_makfrom0str (tr->id_string ().to_str0 ());
 }
 
 LY_DEFINE (ly_context_name, "ly:context-name",
@@ -150,3 +150,11 @@ LY_DEFINE (ly_context_find, "ly:context-find",
   return SCM_BOOL_F;
 }
 
+LY_DEFINE (ly_context_now, "ly:context-now",
+          1, 0, 0, (SCM context),
+          "Return now-moment of context CONTEXT")
+{
+  Context *ctx = unsmob_context (context);
+  SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
+  return ctx->now_mom ().smobbed_copy ();
+}