X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Fmusic-function.ly;h=6a6ade9ce35b842a038be5f02268c6b58c6b8942;hb=5532801f30af2000fa4085e2e3853efe2f6b095b;hp=650bc910c239a88ab6397317d201bf09c8b5cbdd;hpb=5956be580d291c1460f1c4b5f6e4a1c3e6549602;p=lilypond.git diff --git a/input/regression/music-function.ly b/input/regression/music-function.ly index 650bc910c2..6a6ade9ce3 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.16" +\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 }