include another song without outputting anything

This commit is contained in:
tux 2025-06-06 18:13:22 +02:00
parent 8d0ddcee06
commit 195110923a
2 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,7 @@
\include "swing_style.ly" \include "swing_style.ly"
\include "inline_score.ly" \include "inline_score.ly"
\include "custom_indentation.ily" \include "custom_indentation.ily"
\include "include_from_song.ily"
% reset important variables % reset important variables
LAYOUT = \layout { \generalLayout } LAYOUT = \layout { \generalLayout }

7
include_from_song.ily Normal file
View File

@ -0,0 +1,7 @@
includeFromSong =
#(define-void-function (filename) (string?)
(let ((noDefaultOutputBackup noDefaultOutput))
(set! noDefaultOutput #t)
(ly:parser-parse-string (ly:parser-clone)
(ly:format "\\include \"~a\"" filename))
(set! noDefaultOutput noDefaultOutputBackup)))