[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A few questions regarding markup
From: |
Reinhold Kainhofer |
Subject: |
Re: A few questions regarding markup |
Date: |
Sun, 15 Nov 2009 20:43:38 +0100 |
User-agent: |
KMail/1.12.3 (Linux/2.6.31-14-generic; KDE/4.3.3; i686; ; ) |
Am Sonntag, 15. November 2009 20:16:51 schrieb Nicolas Sceaux:
> Le 14 nov. 2009 à 09:29, David Kastrup a écrit :
> > Now the harp-pedal command defines the property signature
> >
> > ((size 1.0)
> > (harp-pedal-details)
> > (thickness 0.5))
> >
> > So far, so fine. It
> > then calls make-harp-pedal without passing it those let-bound
> > variables. As far as I understand Scheme and its closures, this means
> > that the defaults specified in this manner are ignored.
I wrote that code, and I have to admit that I don't understand this part at
all. I simply copied code from somewhere else and tweaked it so that it
worked....
> > make-harp-pedal then starts off with
> >
> > (let* ((size (chain-assoc-get 'size props 1.2))
> > (details (chain-assoc-get 'harp-pedal-details props '()))
>
> Just remove the useless binding of `size' in the let form,
> and give the appropriate default in the property argument.
Ah, interesting... So, in the make-harp-pedal function, the properties defined
in the harp-pedal markup function are available? That's cool!
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org