-(define (markup-function<? a b)
- (ly:string-ci<? (symbol->string (procedure-name a)) (symbol->string (procedure-name b))))
+(define (markup-name<? a b)
+ (ly:string-ci<? (symbol->string (car a)) (symbol->string (car b))))
+
+(define all-markup-commands '())
+(define all-markup-list-commands '())
+
+(for-each
+ (lambda (m)
+ (module-for-each (lambda (sym var)
+ (let ((val (variable-ref var)))
+ (cond ((markup-function? val)
+ (set! all-markup-commands
+ (acons sym val all-markup-commands)))
+ ((markup-list-function? val)
+ (set! all-markup-list-commands
+ (acons sym val all-markup-list-commands))))))
+ (module-public-interface m)))
+ (cons (current-module) (map resolve-module '((lily) (scm accreg)))))
+
+(set! all-markup-commands (sort! all-markup-commands markup-name<?))
+(set! all-markup-list-commands (sort! all-markup-list-commands markup-name<?))