]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/documentation-lib.scm
Merge branch 'master' of git://git.savannah.gnu.org/lilypond.git
[lilypond.git] / scm / documentation-lib.scm
index e4775b5db19a737f4cebeaddbeb8feda405f89ae..af48e55c6b51a32b40a1f1e223e5ef1daf62e2fb 100644 (file)
@@ -159,7 +159,7 @@ string-to-use).  If QUOTE? is #t, embed table in a @quotation environment."
   name)
 
 (define (ref-ify x)
-  "Return @ref{X}. If mapping ref-ify to a list that needs to be sorted,
+  "Return @ref{X}.  If mapping ref-ify to a list that needs to be sorted,
    sort the list first."
   (string-append "@ref{" x "}"))
 
@@ -179,6 +179,13 @@ string-to-use).  If QUOTE? is #t, embed table in a @quotation environment."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; property  stuff.
 
+(define (verify-type-name where sym type)
+  (if (eq? type #f)
+      (ly:error (_ "cannot find description for property `~S' (~S)")
+                sym
+                where))
+  (type-name type))
+
 (define (property->texi where sym . rest)
   "Document SYM for WHERE (which can be translation, backend, music),
 with init values from ALIST (1st optional argument)
@@ -190,7 +197,7 @@ with init values from ALIST (1st optional argument)
         (doc-name (string->symbol
                    (string-append (symbol->string where) "-doc")))
         (type (object-property sym type?-name))
-        (typename (type-name type))
+        (typename (verify-type-name where sym type))
         (desc (object-property sym doc-name))
         (init-value (assoc-get sym alist)))