[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 12:22:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> I'm interested in
> - general thoughts on the signature design (as I still lack experience
> with Scheme functions)
> % Plain signature of the function draft
> annotate =
> #(define-void-function (parser location grob type properties annotation)
> (string? string? list? string?)
> )
>
> \relative ges, {
> \key ges \major
> \clef bass
> \time 3/4
>
> \repeat tremolo 24 ges32-> -\markup { \dynamic "sfz" } \p \< |
> \annotate Script "critremark"
> #'(("voice" . "vc1")
> ("source" . "Ms. 2")
> ("author" . "Urs Liska")
> ("date" . "2013-06-06"))
> "Tenuto added as in Vc. 2"
If your first argument is something like Script, you might want to make
it of type symbol? instead. I actually have a syntax sanitizing patch
in limbo where unquoted words are not accepted as strings. It is not
going to make it into 2.18, but I don't promise I won't push it at some
later point of time.
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"
}
Of course, you might get unsets and overrides and reverts slipped in
which you would want to weed out again, but list? is also prone to
permitting a lot that you don't want to see.
--
David Kastrup
- 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, 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, 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