lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional \when-property


From: Kieren MacMillan
Subject: Re: conditional \when-property
Date: Wed, 31 Jul 2013 22:39:28 -0400

Hi David,

> the ly:make-stencil in your function is unneccesary.  All you need to do is 
> the following:
> 
>  #(define-markup-command (when-property layout props symbol markp) (symbol? 
> markup?)
>   (if (chain-assoc-get symbol props)
>       (interpret-markup layout props markp)
>       empty-stencil))

A-ha! I had tried

 #(define-markup-command (when-property layout props symbol markp) (symbol? 
markup?)
  (if (chain-assoc-get symbol props)
      (interpret-markup layout props markp)
      (empty-stencil)))

which threw an error.

Thanks for the correction!

Cheers,
Kieren.

p.s. Does anyone else think this should be part of the standard distro? Or is 
there an even more general conditional that is already, or should be, in there 
to be employed?


reply via email to

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