From 8402d4c2104f412d38488bf7f16b428404c9a156 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Tue, 29 Sep 2009 15:48:32 +0200 Subject: [PATCH] killCues should not remove music quoted with \quoteDuring, only \cueDuring! --- input/regression/quote-kill-cues.ly | 18 ++++++++++++++++++ ly/music-functions-init.ly | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 input/regression/quote-kill-cues.ly 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)) -- 2.39.5