From: Reinhold Kainhofer Date: Tue, 29 Sep 2009 13:48:32 +0000 (+0200) Subject: killCues should not remove music quoted with \quoteDuring, only \cueDuring! X-Git-Tag: release/2.13.5-0~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8402d4c2104f412d38488bf7f16b428404c9a156;p=lilypond.git killCues should not remove music quoted with \quoteDuring, only \cueDuring! --- diff --git a/input/regression/quote-kill-cues.ly b/input/regression/quote-kill-cues.ly new file mode 100644 index 0000000000..79541220bf --- /dev/null +++ b/input/regression/quote-kill-cues.ly @@ -0,0 +1,18 @@ +\version "2.13.5" + +\header { + texidoc = "@code{\\killCues} shall only remove real cue notes generated by + @code{\\cueDuring}, but not other music quoted using @code{\\quoteDuring}." +} + +mus = \relative c' { c2 c c c c c c c } +\addQuote #"M" \mus + +q = \relative c' { + d2 \quoteDuring #"M" { s1 } e2 \cueDuring #"M" #UP { s1 } f2 +} + +\score { << + \q + \killCues \q +>> } diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index a57a17bc80..2f1f531036 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -322,7 +322,8 @@ killCues = (_i "Remove cue notes from @var{music}.") (music-map (lambda (mus) - (if (string? (ly:music-property mus 'quoted-music-name)) + (if (and (string? (ly:music-property mus 'quoted-music-name)) + (string=? (ly:music-property mus 'quoted-context-id) "cue")) (ly:music-property mus 'element) mus)) music))