From 12b68a3172f040e768b7d229aa14fb4838e75742 Mon Sep 17 00:00:00 2001 From: Nathan Chou Date: Mon, 25 Jul 2016 17:45:29 -0700 Subject: Issue 4954/1: Change spanner-id to be a key instead of a string Also changes argument \= to be a key. Backport-by: David Kastrup --- ly/grace-init.ly | 4 ++-- ly/spanners-init.ly | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'ly') diff --git a/ly/grace-init.ly b/ly/grace-init.ly index 6fe32f49fb..a46111e4d9 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -1,7 +1,7 @@ \version "2.17.6" -startGraceSlur = #(make-music 'SlurEvent 'span-direction START 'spanner-id "grace") -stopGraceSlur = #(make-music 'SlurEvent 'span-direction STOP 'spanner-id "grace") +startGraceSlur = #(make-music 'SlurEvent 'span-direction START 'spanner-id 'grace) +stopGraceSlur = #(make-music 'SlurEvent 'span-direction STOP 'spanner-id 'grace) startGraceMusic = { diff --git a/ly/spanners-init.ly b/ly/spanners-init.ly index 756a55579e..8d8a69444f 100644 --- a/ly/spanners-init.ly +++ b/ly/spanners-init.ly @@ -1,18 +1,15 @@ \version "2.19.29" "\\=" = -#(define-event-function (id event) (number-or-string? ly:event?) +#(define-event-function (id event) (key? ly:event?) (_i "This sets the @code{spanner-id} property of the following -@var{event} to the given @var{id} (numbers will be converted to a -string). This can be used to tell LilyPond how to connect overlapping +@var{event} to the given @var{id} (non-negative integer or symbol). +This can be used to tell LilyPond how to connect overlapping or parallel slurs or phrasing slurs within a single @code{Voice}. @lilypond[quote,verbatim] \\fixed c' { c\\=1( d\\=2( e\\=1) f\\=2) } @end lilypond\n") - (set! (ly:music-property event 'spanner-id) - (if (number? id) - (number->string id) - id)) + (set! (ly:music-property event 'spanner-id) id) event) startGroup = #(make-span-event 'NoteGroupingEvent START) -- cgit v1.2.3