(lambda (p) (variable-set! (cadr p) (cddr p)))
(ly:get-undead lilypond-declarations))))
+(define lilypond-interfaces #f)
+
(define-public (session-initialize thunk)
"Initialize this session. The first session in a LilyPond run is
initialized by calling @var{thunk}, then recording the values of all
(if (ly:undead? lilypond-declarations)
(begin
+ (module-use-interfaces! (current-module) (reverse lilypond-interfaces))
(for-each
(lambda (p)
(let ((var (cadr p))
(ly:get-undead lilypond-declarations)))
(begin
(thunk)
+ (set! lilypond-interfaces
+ (filter (lambda (m) (eq? 'interface (module-kind m)))
+ (module-uses (current-module))))
(let ((decl (map! (lambda (v)
(cons* #f v (variable-ref v)))
lilypond-declarations)))