1 ;;;; document-markup.scm -- part of generated backend documentation
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 (define (doc-markup-function func)
10 ((doc-str (procedure-documentation func) )
11 (f-name (symbol->string (procedure-name func)))
12 (c-name (regexp-substitute/global #f "-markup$" f-name 'pre "" 'post))
13 (sig (object-property func 'markup-signature))
16 (cddr (cadr (procedure-source func)))))
18 (sig-type-names (map type-name sig))
19 (signature (zip arg-names sig-type-names))
22 (map (lambda (x) (string-append
23 "@var{" (car x) "} (" (cadr x) ")" ))
24 (zip arg-names sig-type-names))
30 "\n\n@item @code{\\" c-name "} " signature-str
32 "\n@findex " f-name "\n"
33 "\n@cindex " c-name "\n"
40 (define (markup-function<? a b)
41 (string<? (symbol->string (procedure-name a)) (symbol->string (procedure-name b))))
43 (define (markup-doc-string)
49 (map doc-markup-function
50 (sort markup-function-list markup-function<?) ) )
55 (define (markup-doc-node)
57 #:name "Markup functions"
58 #:desc "Definitions of the markup functions."
59 #:text (markup-doc-string)))