]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/document-markup.scm
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / scm / document-markup.scm
index 0ffbdc53ef9e0b364fdcd28496cf6b144ada8245..8761deb83db17b031f0d65f12f1d7e9ef7395053 100644 (file)
@@ -2,20 +2,19 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c)  1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 1998--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
 (define (doc-markup-function func)
   (let* ((doc-str  (procedure-documentation func))
         (f-name (symbol->string (procedure-name  func)))
-        (c-name (regexp-substitute/global #f "-markup$" f-name  'pre "" 'post))
+        (c-name (regexp-substitute/global #f "-markup(-list)?$" f-name  'pre "" 'post))
         (sig (object-property func 'markup-signature))
-        (arg-names
-         (map symbol->string 
-              (cddr (cadr (procedure-source func)))))
-        
+        (arg-names (let ((arg-list (cadr (procedure-source func))))
+                      (if (list? arg-list)
+                          (map symbol->string (cddr arg-list))
+                          (make-list (length sig) "arg"))))
         (sig-type-names (map type-name sig))
-        (signature (zip arg-names  sig-type-names))
         (signature-str
          (string-join
           (map (lambda (x) (string-append
               (sort markup-function-list markup-function<?)))
    "\n@end table"))
 
+(define (markup-list-doc-string)
+  (string-append
+   "@table @asis"
+   (apply string-append
+         (map doc-markup-function
+              (sort markup-list-function-list markup-function<?)))
+   "\n@end table"))
+
 (define (markup-doc-node)
   (make <texi-node>
     #:name "Markup functions"
     #:desc "Definitions of the markup functions."
     #:text (markup-doc-string)))
+
+(define (markup-list-doc-node)
+  (make <texi-node>
+    #:name "Markup list functions"
+    #:desc "Definitions of the markup list functions."
+    #:text (markup-list-doc-string)))