X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-scheme.cc;h=64f8dd8e15a0fdb3fbf9d2f8fd1821188395c231;hb=7f96f595916833f1d3e96b1a6e0d8c617703e534;hp=b62a83f2399a8fb36636a0c4976ffc26bb6ed20a;hpb=4a401ca1c60f428daa242dbdd102fdb3f327ebfb;p=lilypond.git diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index b62a83f239..64f8dd8e15 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1998--2011 Jan Nieuwenhuizen + Copyright (C) 1998--2012 Jan Nieuwenhuizen Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -211,3 +211,15 @@ LY_DEFINE (ly_context_events_below, "ly:context-events-below", Context *ctx = unsmob_context (context); return ctx->events_below ()->self_scm (); } + +LY_DEFINE (ly_make_event_class, "ly:make-event-class", + 2, 0, 0, (SCM context, SCM type), + "Make an event class (a list of types) from the given @var{type}" + " within the global context containing @var{context}.") +{ + LY_ASSERT_SMOB (Context, context, 1); + LY_ASSERT_TYPE (ly_is_symbol, type, 2); + + Context *ctx = unsmob_context (context); + return ctx->make_event_class (type); +}