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>
11 (define (dashify-underscores str)
12 (regexp-substitute/global #f "_" str 'pre "-" 'post))
14 (define (format-c-header c-h)
15 (regexp-substitute/global
17 (regexp-substitute/global #f "(SCM|\\)|\\() *" (dashify-underscores c-h)
21 (define (document-scheme-function name c-header doc-string)
23 "@defun " (symbol->string name) " " (format-c-header c-header) "\n"
27 (define all-scheme-functions
29 (lambda (key val prior)
30 (cons (cons key val) prior))
31 '() (ly:get-all-function-documentation)))
33 (define (all-scheme-functions-doc)
35 ((fdocs (map (lambda (x)
36 (document-scheme-function (car x) (cadr x) (cddr x))
40 (sfdocs (sort fdocs string<?)))
42 #:name "Scheme functions"
43 #:desc "Primitive functions exported by LilyPond"
45 (apply string-append sfdocs))
49 ; (dump-node (all-scheme-functions-doc) (current-output-port) 0 )