lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional when-property function not working as intended


From: David Kastrup
Subject: Re: conditional when-property function not working as intended
Date: Fri, 16 Sep 2016 14:46:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi David,
>
> Thank you for the helpful reply and documentation/explanation.
>
>> -- Function: ly:chain-assoc-get key achain default-value
>>          strict-checking
>>     Return value for KEY from a list of alists ACHAIN.  If no entry is
>>     found, return DEFAULT-VALUE or ‘#f’ if DEFAULT-VALUE is not
>>     specified.  [...]
>> 
>> DEFAULT-VALUE is specified as markp, and a markup is never #f.  So your
>> condition is always true when the specified KEY cannot be found.
>
> So how could I code the when-property function so that it is false
> when the KEY cannot be found?

By not specifying a default value?  I have absolutely no idea why you
put `markp' as the default-value of your call to ly:chain-assoc-get.  It
does not serve any purpose conceivable to me, particularly since you are
only planning to use its value when finding the key, and the purpose of
the default-value is to be substituted when _not_ finding the key.

-- 
David Kastrup



reply via email to

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