lilypond-user
[Top][All Lists]
Advanced

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

Re: `ly:context-property` and empty alist,Re: `ly:context-property` and


From: Werner LEMBERG
Subject: Re: `ly:context-property` and empty alist,Re: `ly:context-property` and empty alist
Date: Sun, 10 Jul 2022 12:57:21 +0000 (UTC)

> the problem here is not really ly:context-property, but the
> C-implementation Context::internal_get_property, which uses SCM_EOL
> as default value. [...]

Thanks for the explanation!

> #(define (context-has-defined? context sym)
>    (eq? (ly:context-property-where-defined context sym) context))
> 
> #(define* (context-strict-get-property context sym #:optional (def '()))
>    (if (context-has-defined? context sym)
>        (ly:context-property context sym)
>        def))

Good to know that this possibility exists.


    Werner



reply via email to

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