Aaron Hill <lilyp...@hillvisions.com> writes: > On 2018-06-07 10:31, David Kastrup wrote: >>> The snippet you mentioned does not work as-is on 2.19.81, so I was >>> curious if there was something new going on with how to define >>> functions. >> >> It will in 2.21.0.
Actually, this one may even be in 2.20.0. > Good grief, man! Why didn't you just say that to begin with? I'm > sitting over here, questioning my [in]sanity. ;) > >>> As I originally suspected `\etc` was nothing more than a placeholder >>> for other, actual markup, your suggested definition of `\doubleBox` >>> ultimately becomes a fixed, parameter-less construct. >> >> Uh, isn't that the definition of a function's parameter? > > Well, I assumed that `\etc` was your personal shorthand in snippets > for "manually put whatever you want here", like an ellipsis. Of > course, I had no reference to know that `\etc` was (or soon will be) > actual valid syntax. > > But it is great to hear that `\etc` will eventually be a thing, as it > should help reduce the need to switch to Scheme for this type of > thing. Will this convenient syntax support more than one argument, or > is that beyond the scope of the feature? \etc is part of 2.19 (somewhere in the 60s) but this particular case of creating an event function by abbreviating markup is currently just in master. It appears to make sense to drag it over as well, though. \etc cuts short one final function call by as many arguments as are missing: that's sort of important because sometimes people don't even know that there may be optional arguments usually left off. So this is not really flexible functionality. However, many functions are designed intentionally in manner where they can formally be nested in their most common incantation without having to keep track of trailing bits. This is, for example, the case with \tweak. Functions designed in that manner tend to work reasonably well with \etc . You'll still need explicit functions for a lot of less basic stuff but it's actually surprising how often \etc with its trailing-arguments requirement is sufficient. -- David Kastrup _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond