Re: [frogs] Adding docstring support to def-grace-function |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: "frogs@xxxxxxxxxxx" <frogs@xxxxxxxxxxx>, lily-devel <lilypond-devel@xxxxxxx>
- Subject: Re: [frogs] Adding docstring support to def-grace-function
- From: "Carl D. Sorensen" <c_sorensen@xxxxxxx>
- Date: Wed, 7 Jan 2009 08:40:13 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
- Thread-index: AclwnNxd27lkSR3UR/iUBDCJh4cBhwAQV6K7
- Thread-topic: [frogs] Adding docstring support to def-grace-function
Hi Patrick,
On 1/7/09 12:51 AM, "Patrick McCarty" <pnorcks@xxxxxxxxx> wrote:
> Hi Frogs,
>
> This issue was recently mentioned on the mailing list:
>
> There are three music functions in Appendix B14 that cannot have
> docstrings. These functions are:
>
> acciaccatura
> appoggiatura
> grace
>
> The reason docstrings cannot be added is because these functions are
> defined *indirectly* through the def-grace-function procedure. You
> can find the definition of def-grace-function in
> scm/music-functions.scm.
Thanks for the clear explanation. This should be helpful to all of us.
>
> In order to add docstrings to these three functions, we have to do two things:
>
> A. Decide on the syntax
> B. Revise the definition of def-grace-function to accomodate docstrings
>
> For A., using acciaccatura as an example, I propose the following syntax:
>
> acciaccatura =
> #(def-grace-function (_i "add docstring") startAcciaccaturaMusic
> stopAcciaccaturaMusic)
There are two reasons I'd like to try something different than this syntax.
First, docstrings always come after the arguments to the function.
Second this syntax would require a convert-ly rule, and so would need to
wait until work begins on 2.13.
A syntax that would not require a convert-ly rule would be
acciaccatura =
#(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
(_i "Here is the docstring."))
because the docstring argument can be written as an optional argument
in the macro definition for def-grace-function. So adding a docstring
is a syntax addition, not a change, and no convert-ly rule is needed.
Anybody else want to chime in?
Thanks,
Carl
---
----
Join the Frogs!