From 36e9fca88604d0722a995d53da3b27fbae63c385 Mon Sep 17 00:00:00 2001 From: Nicolas Sceaux Date: Thu, 1 May 2008 12:45:27 +0200 Subject: [PATCH] Markup command documentation: manually order categories When a new markup command category is added, update `ordered-categories' in the markup-doc-node function, file scm/document-markup.scm (otherwise the new category will be added at the end). --- scm/document-markup.scm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scm/document-markup.scm b/scm/document-markup.scm index cffdf2afda..77ee9b97dc 100644 --- a/scm/document-markup.scm +++ b/scm/document-markup.scm @@ -96,13 +96,16 @@ #:name "Text markup commands" #:desc "" #:text "The following commands can all be used inside @code{\\markup @{ @}}." - #:children (let ((categories (sort (hash-fold (lambda (category function+properties categories) - (cons category categories)) - (list) - markup-functions-by-category) - (lambda (c1 c2) - (stringstring c1) - (symbol->string c2)))))) + #:children (let* (;; when a new category is defined, update `ordered-categories' + (ordered-categories '(font align graphic music fret-diagram other)) + (raw-categories (hash-fold (lambda (category functions categories) + (cons category categories)) + (list) + markup-functions-by-category)) + (categories (append ordered-categories + (filter (lambda (cat) + (not (memq cat ordered-categories))) + raw-categories)))) (map markup-category-doc-node categories)))) (define (markup-list-doc-node) -- 2.39.2