lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 4495 Remove unnecessary #{ .. #} constructs (issue 253310043 b


From: Trevor Daniels
Subject: Re: Issue 4495 Remove unnecessary #{ .. #} constructs (issue 253310043 by address@hidden)
Date: Sun, 19 Jul 2015 17:50:46 +0100

address@hidden wrote Saturday, July 18, 2015 11:02 PM


> One thing that you have to be aware of is that
> #{ \music #}
> is not equivalent to music but rather to
> (ly:music-deep-copy music (*location*))
> since it creates a copy of the music and puts the point-and-click
> information to the call of the containing music function.
>
> Now I don't really know whether you want the (*location*) here: it would
> likely substitute less useful origin information when everything points
> to the call of the template.  But for any music that is potentially used
> more than once, you definitely want a copy.  If you don't use a copy,
> then any \relative or \transpose of the music in one place will appear
> in all other places as well, which usually means that you get more
> invocations of \relative or \transpose on any particular appearance than
> you intended.

I *think* what I have is OK.  None of the music variables are used
more than once in the template - in ly/voice.t-kit - where they are
referenced as #{ ... #music ... #} (other than checking for #f).
  
Hhm.  Not sure about *location*, but I think it would be more useful
to the user to point to the template call rather than to a line in
ly/voice.t-kit - the only place where the music variables are used
as music (as opposed to checking for #f), but I may be
misunderstanding something here.  

> https://codereview.appspot.com/253310043/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]