[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inherit-acceptability
From: |
David Kastrup |
Subject: |
Re: inherit-acceptability |
Date: |
Sat, 05 Sep 2015 00:54:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Timothy Lanfear <address@hidden> writes:
> I like, and am using, the new inherit-acceptability feature. Without
> thinking too much about what I was doing, I put inherit-acceptability
> inside the definition of a new context, instead of following as shown
> in the documentation.
>
> \layout {
> \context {
> \StaffGroup
> \name "RecorderConsort"
> \alias StaffGroup
> \inherit-acceptability RecorderConsort StaffGroup
> }
> }
>
> It works fine.
That's like saying calling a void function performing a global
assignment inside of a music expression works fine. In some manner it
does, but it bears no relation whatsoever to its placement inside of the
music expression.
It's more of a weird quirk than anything else and should be avoided.
> Would inherit-acceptability ever be used other than right away when
> defining a new context?
If the desired _end_ result of acceptabilities is not equality, you
might use them in an order not necessarily matching the definition
order.
> And if not, the first argument is redundant; perhaps it can be
> inferred?
It can't. A context definition is a purely syntactical entity: it has
no scopes or other tangible features associated with it. A void
function is only permitted here for the sake of making it possible to
write a function that conditionally returns a context mod, like
#(if [condition] #{ \with { \consists "Bar_default_engraver" } #})
which will be silently accepted (and ignored) when [condition] is false.
The return value of \inherit-acceptability is indistinguishable from
that, but the environment in which it is called is indistinguishable
from the enclosing output definition.
--
David Kastrup