X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmusic-scheme.cc;h=c0e4eb3167fdfcaa55b82b89491a8ba1b85a3eb6;hb=eaa41b4e4dc1d3b893c5a75711f26db6a7f5fa18;hp=c90acd5f17f68c968e204ae5e36876828f409f21;hpb=a9d9433bc7b95cb2d4b3d96eefce7a8437c0d44e;p=lilypond.git diff --git a/lily/music-scheme.cc b/lily/music-scheme.cc index c90acd5f17..c0e4eb3167 100644 --- a/lily/music-scheme.cc +++ b/lily/music-scheme.cc @@ -1,9 +1,20 @@ /* - music-scheme.cc -- implement Music bindings + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2009 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "music.hh" @@ -21,13 +32,14 @@ LY_DEFINE (ly_music_length, "ly:music-length", return sc->get_length ().smobbed_copy (); } -LY_DEFINE (ly_music_property, - "ly:music-property", 2, 1, 0, (SCM mus, SCM sym, SCM dfault), - "Get the property @var{sym} of music expression @var{mus}." - " If @var{sym} is undefined, return @code{'()}.") +LY_DEFINE (ly_music_property, "ly:music-property", + 2, 1, 0, (SCM mus, SCM sym, SCM val), + "Return the value for property @var{sym} of music expression" + " @var{mus}. If no value is found, return @var{val} or" + " @code{'()} if @var{val} is not specified.") { LY_ASSERT_TYPE (unsmob_music, mus, 1); - return ly_prob_property (mus, sym, dfault); + return ly_prob_property (mus, sym, val); } LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!", @@ -57,7 +69,7 @@ LY_DEFINE (ly_make_music, "ly:make-music", LY_DEFINE (ly_music_p, "ly:music?", 1, 0, 0, (SCM obj), - "Type predicate.") + "Is @var{obj} a music object?") { return scm_from_bool (unsmob_music (obj)); } @@ -76,8 +88,7 @@ LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties", LY_DEFINE (ly_music_list_p, "ly:music-list?", 1, 0, 0, (SCM lst), - "Type predicate: Return true if @var{lst} is a list" - " of music objects.") + "Is @var{lst} a list of music objects?") { if (scm_list_p (lst) == SCM_BOOL_T) while (scm_is_pair (lst))