Hello, This patch reworks def-grace-function so that it inserts the docstring, if defined, into the template for define-music-function. If the docstring is not defined, the unquote-splicing strips the empty list from the template. All further processing is left to define-music-function.
Will this work? I've tested it with the acciaccatura function. Thanks, Patrick
From d483a4150aebc3f9bb268001f5e549aa26a4911f Mon Sep 17 00:00:00 2001 From: Patrick McCarty <pnor...@gmail.com> Date: Sat, 10 Jan 2009 18:09:12 -0800 Subject: [PATCH] Docs: Add docstring support to def-grace-function Signed-off-by: Patrick McCarty <pnor...@gmail.com> --- scm/music-functions.scm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index f9599af..00facb5 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -720,8 +720,9 @@ SkipEvent. Useful for extracting parts from crowded scores" -(defmacro-public def-grace-function (start stop) +(defmacro-public def-grace-function (start stop . docstring) `(define-music-function (parser location music) (ly:music?) + ,@docstring (make-music 'GraceMusic 'origin location 'element (make-music 'SequentialMusic -- 1.6.1
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel