From 38eb0e029bdeb5ff9dfa5ca3be83ce2f285dbe09 Mon Sep 17 00:00:00 2001 From: Mark Polesky Date: Wed, 1 Jul 2009 16:34:18 -0700 Subject: [PATCH] Auto-sort all-grob-properties alist for docs. - add auto-sorting code to top of document-backend.scm - remove calls to (sort ...) that are now redundant --- scm/document-backend.scm | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/scm/document-backend.scm b/scm/document-backend.scm index 18762aeba9..95be16550a 100644 --- a/scm/document-backend.scm +++ b/scm/document-backend.scm @@ -5,10 +5,32 @@ ;;;; (c) 2000--2009 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen +(define (sort-grob-properties x) + ;; force 'meta to the end of each prop-list + (let ((meta (assoc 'meta x))) + (append (sort (assoc-remove! x 'meta) ly:alist-citexi 'backend pr grob-description))) @@ -56,12 +78,10 @@ (let* ((name (symbol->string (car interface))) (interface-list (human-listify (map ref-ify - (sort (map symbol->string (hashq-ref iface->grob-table (car interface) - '())) - ly:string-ci #:name name #:text (string-append @@ -139,8 +159,6 @@ node." (cons (cons key val) prior)) '() (ly:all-grob-interfaces))) -(set! interface-description-alist (sort interface-description-alist ly:alist-ci