From a89b9dc57742f20017ba9f298d98419ffcd32bc9 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:48:24 +0000 Subject: [PATCH] lilypond-1.3.125 --- scm/backend-documentation-lib.scm | 22 ++++++++------- scm/documentation-lib.scm | 10 +++---- scm/engraver-documentation-lib.scm | 43 +++++++++++++++++++++++++----- 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/scm/backend-documentation-lib.scm b/scm/backend-documentation-lib.scm index ac1e63a75c..9802360423 100644 --- a/scm/backend-documentation-lib.scm +++ b/scm/backend-documentation-lib.scm @@ -19,21 +19,25 @@ (cons (string-append "@code{" name "} " "(" typename ")" - ":" ) + ": " + +; index gets too messy +; "@vindex " name "\n" + + + ) desc))) -(define (document-grob-property sym grob-description only-doc-if-set) +(define (document-grob-property sym grob-description ) (let* ((handle (assoc sym grob-description)) (defval (if (eq? handle #f) - "" + "(unset)" (scm->texi (cdr handle)))) (propdoc (backend-property->texi sym))) - (if (and only-doc-if-set (eq? handle #f)) - '("" . "") - (cons (car propdoc) (string-append (cdr propdoc) + (cons (car propdoc) (string-append (cdr propdoc) "\nDefault value: " - defval))))) + defval)))) (define (document-interface where interface grob-description) (let* ((level (if (eq? where 'grob) 3 2)) @@ -42,7 +46,7 @@ (props (caddr interface)) (docfunc (lambda (x) (document-grob-property - x grob-description (eq? where 'grob)))) + x grob-description ))) (docs (map docfunc props))) (string-append @@ -93,7 +97,7 @@ engraver-description-alist)))) (string-append name " grobs are created by: " - (human-listify (map reffy + (human-listify (map ref-ify (map engraver-name (map symbol->string engravers)))))) diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index dd863c9b17..2db0451aa9 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -71,7 +71,7 @@ Add a ref if REF is set (string-append "\n" (cdr (assoc level texi-section-alist)) " " (if ref - (string-append "@ref{" name "}") + (ref-ify name) name) "\n")) @@ -103,7 +103,7 @@ Add a ref if REF is set ;; Menus don't appear in html, so we make a list ourselves "\n@ignore\n" "\n@ifhtml\n" - (description-list->texi (map (lambda (x) (cons (reffy (car x)) (cdr x))) + (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x))) items-alist)) "\n@end ifhtml\n" "\n@end ignore\n")) @@ -133,18 +133,18 @@ Add a ref if REF is set )) (define (context-name name) - (string-append "Context " name)) + name) (define (engraver-name name) name) (define (grob-name name) - (string-append "Grob " name)) + name) (define (interface-name name) name) -(define (reffy x) +(define (ref-ify x) (string-append "@ref{" x "}")) (define (human-listify l) diff --git a/scm/engraver-documentation-lib.scm b/scm/engraver-documentation-lib.scm index bdab2c870e..8e8ceff574 100644 --- a/scm/engraver-documentation-lib.scm +++ b/scm/engraver-documentation-lib.scm @@ -42,9 +42,9 @@ (if (null? objs) "" (string-append - "This engraver creates \n " - (human-listify (map reffy (map grob-name objs))) - " grobs.") + "This engraver creates the following grobs: \n " + (human-listify (map ref-ify objs)) + ".") ) "\n\n" @@ -66,7 +66,7 @@ context-description-alist)))) (string-append name " is part of contexts: " - (human-listify (map reffy (map context-name contexts)))))))) + (human-listify (map ref-ify (map context-name contexts)))))))) ;; First level Engraver description @@ -103,23 +103,54 @@ (cdr (assoc 'consists context-desc)) (cdr (assoc 'end-consists context-desc)) )) + (grobs (context-grobs context-desc)) + (grob-refs (map (lambda (x) (ref-ify x)) grobs)) ) (string-append desc + "\n\nThis context creates the following grobs: \n\n" + (apply string-append (map (lambda (x) (string-append " " x " ")) grob-refs)) + "." (if (null? accepts) "This context is a `bottom' context; it can not contain other contexts." (string-append + "\n\nContext " name " can contain \n" - (human-listify (map reffy (map context-name accepts))))) + (human-listify (map ref-ify (map context-name accepts))))) "\n\nThis context is built from the following engravers: " (if no-copies - (human-listify (map reffy (map engraver-name consists))) + (human-listify (map ref-ify (map engraver-name consists))) (apply string-append (map document-engraver-by-name consists)))))) +(define (engraver-grobs name) + (let* ( + (eg (assoc (string->symbol name) engraver-description-alist)) + ) + + (if (eq? eg #f) + '() + (map symbol->string (caddr (cdr eg))) + ) + )) + +(define (context-grobs context-desc) + (let* ( + (consists (append + (list (cdr (assoc 'group-type context-desc))) + (cdr (assoc 'consists context-desc)) + (cdr (assoc 'end-consists context-desc)) + )) + (grobs (apply append + (map engraver-grobs consists)) + ) + ) + grobs + )) + ;; First level Context description (define (document-context top context-desc) -- 2.39.5