X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdocument-music.scm;h=b8190d95f441967bf17cf7ab654af91943b95f03;hb=0e5d83a9ceb4a143f83d22406d7eb816314ff9f7;hp=d6bd4e1c59c3b836a38221628a16ad79e1de3e8f;hpb=d84c7587117731add28b3b3591e9ef3d92fa827c;p=lilypond.git diff --git a/scm/document-music.scm b/scm/document-music.scm index d6bd4e1c59..b8190d95f4 100644 --- a/scm/document-music.scm +++ b/scm/document-music.scm @@ -1,62 +1,75 @@ ;;;; document-markup.scm -- part of generated backend documentation ;;;; ;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 1998--2006 Han-Wen Nienhuys +;;;; +;;;; (c) 1998--2009 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen (define (music-props-doc) (make #:name "Music properties" - #:desc "All music properties, including descriptions" + #:desc "All music properties, including descriptions." #:text (let* ((ps (sort (map symbol->string all-music-properties) stringtexi 'music (string->symbol prop))) ps)) - (texi (description-list->texi descs))) + (texi (description-list->texi descs #f))) texi))) (define music-types->names (make-vector 61 '())) -(map (lambda (entry) - (let* ((types (cdr (assoc 'types (cdr entry))))) - (map (lambda (type) - (hashq-set! music-types->names type - (cons (car entry) - (hashq-ref music-types->names type '())))) - types))) - music-descriptions) +(filter-map (lambda (entry) + (let* ((class (ly:camel-case->lisp-identifier (car entry))) + (classes (ly:make-event-class class))) + (if classes + (map + (lambda (cl) + (hashq-set! music-types->names cl + (cons (car entry) + (hashq-ref music-types->names cl '())))) + classes) + #f))) + + music-descriptions) (define (strip-description x) (cons (symbol->string (car x)) "")) (define (music-type-doc entry) - (make - #:name (symbol->string (car entry)) - #:text - (string-append - "\nMusic event type @code{" - (symbol->string (car entry)) - "} is in Music objects of type " - (human-listify - (sort - (map (lambda (x) (ref-ify (symbol->string x))) - (cdr entry)) stringstring + (map ly:translator-name + (filter + (lambda (x) + (engraver-accepts-music-type? (car entry) x)) + all-engravers-list))))))) + (make + #:name (symbol->string (car entry)) + #:text + (string-append + "\nMusic event type @code{" + (symbol->string (car entry)) + "} is in music objects of type " + (human-listify + (sort + (map (lambda (x) (ref-ify (symbol->string x))) + (cdr entry)) stringstring - (map ly:translator-name - (filter - (lambda (x) (engraver-accepts-music-type? (car entry) x)) all-engravers-list))))) - "\n\n"))) + "\n\n" + (if (equal? accept-list "none") + "Not accepted by any engraver or performer" + (string-append + "Accepted by: " + accept-list)) + ".")))) (define (music-types-doc) (make #:name "Music classes" - #:children + #:children (map music-type-doc (sort (hash-table->alist music-types->names) alistlisp-identifier namesym)) + (classes (ly:make-event-class class)) + (accept-list (if classes + (human-listify + (map ref-ify + (map symbol->string + (map ly:translator-name + (filter + (lambda (x) + (engraver-accepts-music-types? classes x)) + all-engravers-list))))) + "")) + (event-texi (if classes + (string-append + "\n\nEvent classes:\n" + (human-listify + (map ref-ify (map symbol->string classes))) + "." + + "\n\n" + (if (equal? accept-list "none") + "Not accepted by any engraver or performer" + (string-append + "Accepted by: " + accept-list)) + ".") + ""))) + (string-append (object-property namesym 'music-description) - "\n\nMusic types:\n" - (human-listify (map ref-ify (map symbol->string types))) - "\n\n" - "\n\nAccepted by: " - (human-listify - (map ref-ify - (map symbol->string (map ly:translator-name - (filter - (lambda (x) (engraver-accepts-music-types? types x)) all-engravers-list))))) - "\n\nProperties: \n" + event-texi + "\n\nProperties:\n" (description-list->texi (map - (lambda (x) (property->texi 'music x props)) - (map car props)))))) + (lambda (x) (property->texi 'music x props)) + (map car props)) + #t)))) (define (music-object-doc obj) (make @@ -98,7 +130,7 @@ (define (music-doc-node) (make #:name "Music definitions" - #:desc "Definition of the Input data structures" + #:desc "Definition of the input data structures." #:children (list (music-expressions-doc)