1 ;;;; document-funcions.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>
12 (define (dashify-underscores str)
13 (regexp-substitute/global #f "_" str 'pre "-" 'post))
15 (define (format-c-header c-h)
16 (regexp-substitute/global
18 (regexp-substitute/global #f "(SCM|\\)|\\() *" (dashify-underscores c-h)
22 (define (document-scheme-function name c-header doc-string)
24 "@defun " (symbol->string name) " " (format-c-header c-header) "\n"
29 (define all-scheme-functions
31 (lambda (key val prior)
32 (cons (cons key val) prior)
34 '() (ly:get-all-function-documentation)))
36 (define (all-scheme-functions-doc)
40 (fdocs (map (lambda (x)
41 (document-scheme-function (car x) (cadr x) (cddr x))
45 (sfdocs (sort fdocs string<?))
50 #:name "Scheme functions"
51 #:desc "Primitive functions exported by LilyPond"
53 (apply string-append sfdocs)
58 ; (dump-node (all-scheme-functions-doc) (current-output-port) 0 )