]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/document-music.scm
Imported Upstream version 2.14.2
[lilypond.git] / scm / document-music.scm
index b8190d95f441967bf17cf7ab654af91943b95f03..93b7b362159280679725ec85ce09aa0a8d002057 100644 (file)
@@ -1,23 +1,34 @@
-;;;; document-markup.scm -- part of generated backend documentation
+;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 1998--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;;
+;;;; LilyPond is free software: you can redistribute it and/or modify
+;;;; it under the terms of the GNU General Public License as published by
+;;;; the Free Software Foundation, either version 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (music-props-doc)
   (make <texi-node>
     #:name "Music properties"
     #:desc "All music properties, including descriptions."
     #:text
-    (let* ((ps (sort (map symbol->string all-music-properties) string<?))
+    (let* ((ps (sort (map symbol->string all-music-properties) ly:string-ci<?))
           (descs (map (lambda (prop)
                         (property->texi 'music (string->symbol prop)))
                       ps))
           (texi (description-list->texi descs #f)))
       texi)))
 
-(define music-types->names (make-vector 61 '()))
+(define music-types->names (make-hash-table 61))
 (filter-map (lambda (entry)
              (let* ((class (ly:camel-case->lisp-identifier (car entry)))
                     (classes (ly:make-event-class class)))
@@ -53,9 +64,8 @@
        (symbol->string (car entry))
        "} is in music objects of type "
        (human-listify
-       (sort
-        (map (lambda (x) (ref-ify (symbol->string x)))
-             (cdr entry)) string<?))
+       (map ref-ify (sort (map symbol->string (cdr entry))
+                          ly:string-ci<?)))
        "."
 
        "\n\n"
@@ -72,7 +82,7 @@
     #:children
     (map music-type-doc
         (sort
-         (hash-table->alist music-types->names) alist<?))))
+         (hash-table->alist music-types->names) ly:alist-ci<?))))
 
 (define (music-doc-str obj)
   (let* ((namesym  (car obj))
                         (string-append
                          "\n\nEvent classes:\n"
                          (human-listify
-                          (map ref-ify (map symbol->string classes)))
+                          (map ref-ify (sort (map symbol->string classes)
+                                             ly:string-ci<?)))
                          "."
 
                          "\n\n"
      (description-list->texi
       (map
        (lambda (x) (property->texi 'music x props))
-       (map car props))
+       (sort (map car props) ly:symbol-ci<?))
       #t))))
 
 (define (music-object-doc obj)