X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdocumentation-lib.scm;h=8315a765c120e9f6ad0097940344ef412ad7059a;hb=27f2d29a45a6ee4dac75b8e8137ec65a1be74fa1;hp=0c9e2bdec6a1a5bbe2491e14b645ae29ba1c4f65;hpb=1ce5e85efda360c05b7db51cb1772fccce4e582c;p=lilypond.git diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index 0c9e2bdec6..8315a765c1 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -3,7 +3,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 2000--2007 Han-Wen Nienhuys +;;;; (c) 2000--2009 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen (use-modules (oop goops) @@ -11,6 +11,7 @@ (srfi srfi-1)) (define-class () + (appendix #:init-value #f #:accessor appendix? #:init-keyword #:appendix) (children #:init-value '() #:accessor node-children #:init-keyword #:children) (text #:init-value "" #:accessor node-text #:init-keyword #:text) (name #:init-value "" #:accessor node-name #:init-keyword #:name) @@ -21,13 +22,13 @@ (node-name x) (node-desc x))) -(define* (dump-node node port level #:optional (appendix #f)) +(define* (dump-node node port level) (display (string-append "\n@node " - (node-name node) - "\n\n" - (if appendix + (if (= level 0) "Top" (node-name node)) + "\n" + (if (appendix? node) (texi-appendix-section-command level) (texi-section-command level)) " " @@ -41,7 +42,7 @@ (node-children node))) "")) port) - (map (lambda (x) (dump-node x port (+ 1 level) appendix)) + (map (lambda (x) (dump-node x port (+ 1 level))) (node-children node))) (define (processing name) @@ -148,7 +149,8 @@ string-to-use). If QUOTE? is #t, embed table in a @quotation environment." name) (define (ref-ify x) - "Add ref to X" + "Return @ref{X}. If mapping ref-ify to a list that needs to be sorted, + sort the list first." (string-append "@ref{" x "}")) (define (human-listify lst)