5 (define (dashify-underscores str)
6 (regexp-substitute/global #f "_" str 'pre "-" 'post))
8 (define (format-c-header c-h)
9 (regexp-substitute/global
11 (regexp-substitute/global #f "(SCM|\\)|\\() *" (dashify-underscores c-h)
15 (define (document-scheme-function name c-header doc-string)
17 "@defun " (symbol->string name) " " (format-c-header c-header) "\n"
22 (define all-scheme-functions
24 (lambda (key val prior)
25 (cons (cons key val) prior)
27 '() (ly:get-all-function-documentation)))
29 (define (all-scheme-functions-doc)
33 (fdocs (map (lambda (x)
34 (document-scheme-function (car x) (cadr x) (cddr x))
38 (sfdocs (sort fdocs string<?))
43 #:name "Scheme functions"
44 #:desc "Primitive functions exported by LilyPond"
46 (apply string-append sfdocs)
51 ; (dump-node (all-scheme-functions-doc) (current-output-port) 0 )