]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-scheme.cc
Clarifies that multi-measure rests can be used for a single bar.
[lilypond.git] / lily / context-scheme.cc
index 3d26ef368c50f1b6853bf7d175acd2c6d1cffb02..c1c82e8d10e94f335b0eb660cf7ee7dfcb69fa82 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",
@@ -97,7 +97,8 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
   SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
-  tr = tr->where_defined (name);
+  SCM val;
+  tr = tr->where_defined (name, &val);
   if (tr)
     return tr->self_scm ();
 
@@ -150,3 +151,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 ();
+}