]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-mod-scheme.cc
Merge remote-tracking branch 'origin/translation' into staging
[lilypond.git] / lily / context-mod-scheme.cc
index 4b3467eb20eeca15a4b3a721e94ed6a229508ed0..6c04c0baf92461d4a4d39b26d2bbbf7f38340062 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2010--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 2010--2014 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -55,3 +55,16 @@ LY_DEFINE (ly_make_context_mod, "ly:make-context-mod",
   else
     return Context_mod ().smobbed_copy ();
 }
+
+LY_DEFINE (ly_context_mod_apply_x, "ly:context-mod-apply!",
+           2, 0, 0, (SCM context, SCM mod),
+           "Apply the context modification @var{mod} to @var{context}.")
+{
+  LY_ASSERT_SMOB (Context, context, 1);
+  LY_ASSERT_SMOB (Context_mod, mod, 2);
+
+  apply_property_operations (unsmob_context (context),
+                             unsmob_context_mod (mod)->get_mods ());
+  scm_remember_upto_here_1 (context);
+  return SCM_UNSPECIFIED;
+}