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))
33 '() (ly:get-all-function-documentation)))
35 (define (all-scheme-functions-doc)
37 ((fdocs (map (lambda (x)
38 (document-scheme-function (car x) (cadr x) (cddr x))
42 (sfdocs (sort fdocs string<?))
47 #:name "Scheme functions"
48 #:desc "Primitive functions exported by LilyPond"
50 (apply string-append sfdocs))
54 ; (dump-node (all-scheme-functions-doc) (current-output-port) 0 )