+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; property stuff.
+
+(define (property->texi where sym . rest)
+ "Document SYM for WHERE (which can be translation, backend, music),
+with init values from ALIST (1st optional argument)
+"
+ (let* ((name (symbol->string sym))
+ (alist (if (pair? rest) (car rest) '()))
+ (type?-name (string->symbol
+ (string-append (symbol->string where) "-type?")))
+ (doc-name (string->symbol
+ (string-append (symbol->string where) "-doc")))
+ (type (object-property sym type?-name))
+ (typename (type-name type))
+ (desc (object-property sym doc-name))
+ (handle (assoc sym alist)))
+
+ (if (eq? desc #f)
+ (error "No description for property ~S" sym))
+
+ (cons
+ (string-append "@code{" name "} "
+ "(" typename ")"
+ (if handle
+ (string-append
+ ":\n\n"
+ (scm->texi (cdr handle))
+ "\n\n")
+ ""))
+ desc)))
+