From 522c1d8305e1fae10e90084d9f757b63b1fab58e Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 26 Oct 2012 10:24:37 +0200 Subject: [PATCH] Issue 2930: Allow \tag to accept multiple tags, like \keepWithTag and \removeWithTag do. --- ly/music-functions-init.ly | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index f916551cc6..df5d8a5005 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -1229,15 +1229,17 @@ styledNoteHeads = (style-note-heads heads style music)) tag = -#(define-music-function (parser location tag arg) (symbol? ly:music?) - - (_i "Add @var{tag} to the @code{tags} property of @var{arg}.") +#(define-music-function (parser location tag music) (symbol-list-or-symbol? ly:music?) + (_i "Tag the following @var{music} with @var{tag} and return the +result, by adding the single symbol or symbol list @var{tag} to the +@code{tags} property of @var{music}.") (set! - (ly:music-property arg 'tags) - (cons tag - (ly:music-property arg 'tags))) - arg) + (ly:music-property music 'tags) + ((if (symbol? tag) cons append) + tag + (ly:music-property music 'tags))) + music) temporary = #(define-music-function (parser location music) -- 2.39.5