From: Han-Wen Nienhuys Date: Sun, 11 Apr 2004 23:46:26 +0000 (+0000) Subject: (The Lyrics context): add note X-Git-Tag: release/2.3.0~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a14b5b5ff23548ad5040245c53896ba6afb1b226;p=lilypond.git (The Lyrics context): add note about manual durations --- diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index ec8499d4b6..4558754152 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -3485,6 +3485,7 @@ Here is an example demonstrating manual lyric durations, @lilypond[relative=1,verbatim,fragment] << \context Voice = melody { + \time 3/4 c2 e4 g2. } \new Lyrics \lyrics { diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index 1de64aef27..5cbce02ddd 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -33,7 +33,7 @@ LY_DEFINE (ly_context_name, "ly:context-name", return ly_symbol2scm (tr->context_name ().to_str0 ()); } -LY_DEFINE (is_contextushpop_property, "ly:context-pushpop-property", +LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property", 3, 1, 0, (SCM context, SCM grob, SCM eltprop, SCM val), "Do a single @code{\\override} or @code{\\revert} operation " "in @var{context}. The grob definition @code{grob} is extended " @@ -50,7 +50,7 @@ LY_DEFINE (is_contextushpop_property, "ly:context-pushpop-property", return SCM_UNDEFINED; } -LY_DEFINE (is_contextroperty, "ly:context-property", +LY_DEFINE (ly_context_property, "ly:context-property", 2, 0, 0, (SCM c, SCM name), "Return the value of @var{name} from context @var{c}") { @@ -76,7 +76,7 @@ LY_DEFINE (ly_context_set_property, "ly:context-set-property!", return SCM_UNSPECIFIED; } -LY_DEFINE (is_contextroperty_where_defined, "ly:context-property-where-defined", +LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined", 2, 0, 0, (SCM context, SCM name), "Return the context above @var{context} " "where @var{name} is defined.") @@ -104,7 +104,7 @@ LY_DEFINE (ly_unset_context_property, "ly:context-unset-property", 2, 0, 0, return SCM_UNSPECIFIED; } -LY_DEFINE (is_contextarent, "ly:context-parent", +LY_DEFINE (ly_context_parent, "ly:context-parent", 1, 0, 0, (SCM context), "Return the parent of @var{context}, @code{#f} if none.") { @@ -137,17 +137,3 @@ LY_DEFINE (ly_context_find, "ly:context-find", return SCM_BOOL_F; } - -#if 0 -/* - What is this used for? Should remove? --hwn - */ -LY_DEFINE (is_contextroperties, "ly:context-properties", - 1, 0, 0, (SCM context), - "Return all properties of @var{context} in an alist.") -{ - Context *tr = unsmob_context (context); - SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context"); - return tr->properties_as_alist (); -} -#endif diff --git a/lily/context.cc b/lily/context.cc index bbd1247432..d9f4b2ccef 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -301,7 +301,7 @@ Context * find_context_below (Context * where, SCM type, String id) { - if (where->is_alias (ly_symbol2scm (type.to_str0 ()))) + if (where->is_alias (type)) { if (id == "" || where->id_string_ == id) return where; diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 38d3d1da94..39590e6f65 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -176,7 +176,7 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!", return SCM_UNDEFINED; } -LY_DEFINE (is_spanner, "ly:spanner?", +LY_DEFINE (ly_spanner_p, "ly:spanner?", 1, 0, 0, (SCM g), "Is @var{g} a spanner object?") { @@ -186,7 +186,7 @@ LY_DEFINE (is_spanner, "ly:spanner?", return ly_bool2scm (b); } -LY_DEFINE (is_item, "ly:item?", +LY_DEFINE (ly_item_p, "ly:item?", 1, 0, 0, (SCM g), "Is @var{g} an @code{Item} object?") { diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 24cbc9e069..20fff1c730 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -182,7 +182,7 @@ LY_DEFINE (ly_warning,"ly:warn", 1, 0, 0, return SCM_BOOL_T; } -LY_DEFINE (is_dir, "ly:dir?", 1,0, 0, (SCM s), +LY_DEFINE (ly_dir_p, "ly:dir?", 1,0, 0, (SCM s), "type predicate. A direction is @code{-1}, @code{0} or " "@code{1}, where @code{-1} represents " "left or down and @code{1} represents right or up.") @@ -356,27 +356,6 @@ LY_DEFINE (ly_number2string, "ly:number->string", return scm_makfrom0str (str); } -/* - Undef this to see if GUILE GC is causing too many swaps. - */ - -//#define TEST_GC - -#ifdef TEST_GC -#include - -static void * -greet_sweep (void *dummy1, void *dummy2, void *dummy3) -{ - fprintf (stderr, "entering sweep\n"); -} - -static void * -wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3) -{ - fprintf (stderr, "leaving sweep\n"); -} -#endif LY_DEFINE (ly_version, "ly:version", 0, 0, 0, (), @@ -395,24 +374,13 @@ LY_DEFINE (ly_unit, "ly:unit", 0, 0, 0, (), -LY_DEFINE (is_dimension, "ly:dimension?", 1, 0, 0, (SCM d), +LY_DEFINE (ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d), "Return @var{d} is a number. Used to distinguish length " "variables from normal numbers.") { return scm_number_p (d); } -static void -init_functions () -{ -#ifdef TEST_GC - scm_c_hook_add (&scm_before_mark_c_hook, greet_sweep, 0, 0); - scm_c_hook_add (&scm_before_sweep_c_hook, wave_sweep_goodbye, 0, 0); -#endif -} - -ADD_SCM_INIT_FUNC (funcs, init_functions); - SCM ly_deep_copy (SCM src) {