X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Fmusic-function.ly;h=b0fa37edf8b93c55cdeb90de09788bc75d2b1bd7;hb=58ff15e68c0d00ee54ca9f5565d6bc3c8304c076;hp=ade2e15585a248e567b76bbc03d0f2935dcc2e7e;hpb=51159f8679de00e6cd526ca2a16e1ea4d4294f81;p=lilypond.git diff --git a/input/regression/music-function.ly b/input/regression/music-function.ly index ade2e15585..b0fa37edf8 100644 --- a/input/regression/music-function.ly +++ b/input/regression/music-function.ly @@ -1,25 +1,22 @@ \header { -texidoc = "Music function are generic music transformation functions, -which can be used to extend music syntax seamlessly." + +texidoc = "Music functions are generic music transformation functions, +which can be used to extend music syntax seamlessly. Here we +demonstrate a @code{\\myBar} function, which works similar to +@code{\\bar}, but is implemented completely in Scheme." } -\version "2.3.4" +\version "2.12.0" -#(define myBar - (ly:make-music-function - (list string?) - (lambda (where type) - (context-spec-music - (context-spec-music (make-property-set 'whichBar type) 'Timing) - 'Score)) - - )) +myBar = #(define-music-function (parser location bar-type) (string?) + (context-spec-music + (context-spec-music (make-property-set 'whichBar bar-type) 'Timing) + 'Score)) -\score{ - { - d4 \myBar #"|:" d4 - - } +\layout { ragged-right = ##t } + +{ + d4 \myBar "|:" d4 }