X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdocument-backend.scm;h=8d7bb3bc25c001b99634efb1e47298ebd6843bf3;hb=a9da2e9dec019aafb6da888df08aca0451a013fd;hp=610f7c094a44ea30ec566c9aa623ee8c4af94af2;hpb=69839a6b840c9cbb3726e81bd6d86591803ff0e9;p=lilypond.git diff --git a/scm/document-backend.scm b/scm/document-backend.scm index 610f7c094a..8d7bb3bc25 100644 --- a/scm/document-backend.scm +++ b/scm/document-backend.scm @@ -1,7 +1,7 @@ ;;;; backend-documentation-lib.scm -- Functions for backend documentation ;;;; ;;;; source file of the GNU LilyPond music typesetter -;;;; +;;;; ;;;; (c) 2000--2007 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen @@ -25,14 +25,14 @@ (if (pair? uprops) (string-append - "\n\n@unnumberedsubsubsec User settable properties:\n" - (description-list->texi user-propdocs)) + "\n\n@subsubheading User settable properties:\n" + (description-list->texi user-propdocs #t)) "") (if (pair? iprops) (string-append - "\n\n@unnumberedsubsubsec Internal properties:\n" - (description-list->texi internal-propdocs)) + "\n\n@subsubheading Internal properties:\n" + (description-list->texi internal-propdocs #t)) "")))) (define iface->grob-table (make-vector 61 '())) @@ -53,19 +53,26 @@ ;; First level Interface description (define (interface-doc interface) - (let ((name (symbol->string (car interface)))) + (let* ((name (symbol->string (car interface))) + (interface-list (human-listify + (map ref-ify + (sort + (map symbol->string + (hashq-ref iface->grob-table + (car interface) + '())) + string #:name name #:text (string-append (interface-doc-string (cdr interface) '()) "\n\n" - "This grob interface is used in the following graphical objects: " - (human-listify - (map ref-ify - (sort - (map symbol->string - (hashq-ref iface->grob-table (car interface) '())) - stringtexi alist) @@ -74,7 +81,8 @@ (description-list->texi (map (lambda (y) (property->texi 'backend y alist)) - uprops)))) + uprops) + #t))) (define (grob-doc description) "Given a property alist DESCRIPTION, make a documentation @@ -91,21 +99,32 @@ node." (ly:error (_ "pair expected in doc ~s") name))) (reverse ifaces))) (engravers (filter - (lambda (x) (engraver-makes-grob? name x)) all-engravers-list)) + (lambda (x) (engraver-makes-grob? name x)) + all-engravers-list)) (namestr (symbol->string name)) - (engraver-names (map symbol->string (map ly:translator-name engravers)))) + (engraver-names (map symbol->string + (map ly:translator-name engravers))) + (engraver-list (human-listify + (map ref-ify + (map engraver-name engraver-names))))) (make #:name namestr #:text (string-append - namestr " objects are created by: " - (human-listify (map ref-ify - (map engraver-name engraver-names))) + namestr " objects " + (if (equal? engraver-list "none") + "are not created by any engraver" + (string-append + "are created by: " + engraver-list)) + "." + "\n\nStandard settings: \n\n" (grob-alist->texi description) - "\n\nThis object supports the following interfaces: \n" - (human-listify ifacedoc))))) + "\n\nThis object supports the following interface(s): \n" + (human-listify ifacedoc) + ".")))) (define (all-grobs-doc) (make @@ -155,7 +174,7 @@ node." (let* ((ps (sort (map symbol->string lst) stringtexi 'backend (string->symbol prop) '())) ps)) - (texi (description-list->texi descs))) + (texi (description-list->texi descs #f))) texi)) ;;(dump-node (grob-doc (cdadr all-grob-descriptions)) (current-output-port) 0 )