[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discuss signature for new function \annotate
From: |
David Kastrup |
Subject: |
Re: Discuss signature for new function \annotate |
Date: |
Thu, 06 Jun 2013 14:16:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> Am 06.06.2013 13:35, schrieb David Kastrup:
>> Putting an "item" of type symbol-list-or-music? last seems like a
>> reasonably good idea.
> Hm, I think I see what you mean,
> but if I write
>
> annotate =
>
> #(define-void-function (parser location type properties annotation item)
>
> (string? list? string? symbol-list-or-music?))
>
> \relative g' {
>
> \annotate
>
> "critremark"
>
> #'()
>
> "Tenuto added as in Vc. 2"
>
> Script
>
> g1--
>
> }
>
>
> I get an error "Zu viel Vorgriff" (too much read-ahead?).
> If I replace 'Script' with '{ c }' for example it compiles without message.
> ???
And if you do
annotate =
#(define-music-function (parser location type properties annotation item)
(string? list? string? symbol-list-or-music?) #{ #})
it also compiles fine (which explains why \shape does not blow up around
our ears).
Looks like I have something more to fix in the parser...
>>>> It is probably worth considering to make properties of type context-mod?
>>>> (potentially optional), then you can write the argument as
>>>>
>>>> \with {
>>>> voice = "vc1"
>>>> source = "Ms. 2"
>>>> author = "Urs Liska"
>>>> date = "2013-06-06"
>>>> }
>>> That looks very good. How would the values then be accessed? Are they
>>> simple variables inside the function? Or does that also create an
>>> alist internally
> Obviously I'm missing that extra bit outside your quote.
>
> annotate =
>
> #(define-void-function (parser location type properties annotation item)
>
> (string? context-mod? string? symbol-list-or-music?))
You mean ly:context-mod?
--
David Kastrup
- Discuss signature for new function \annotate, Urs Liska, 2013/06/06
- Re: Discuss signature for new function \annotate, David Kastrup, 2013/06/06
- Re: Discuss signature for new function \annotate, Urs Liska, 2013/06/06
- Re: Discuss signature for new function \annotate, David Kastrup, 2013/06/06
- Re: Discuss signature for new function \annotate, Urs Liska, 2013/06/06
- Re: Discuss signature for new function \annotate,
David Kastrup <=
- Re: Discuss signature for new function \annotate, David Kastrup, 2013/06/06
- Re: Discuss signature for new function \annotate, David Kastrup, 2013/06/06
- Re: Discuss signature for new function \annotate, Urs Liska, 2013/06/06
- Re: Discuss signature for new function \annotate, David Kastrup, 2013/06/06
Re: Discuss signature for new function \annotate (new version), Urs Liska, 2013/06/10