Jan-Peter Voigt <jp.vo...@gmx.de> writes:

> Hello David,
>> Any reason you don't just do #{ \include #file #} here?
>>
> yes there is:
> --snip--
> \version "2.15.21"
>
> #(define-public includeLocal (define-music-function (parser location
> file)(string?)
>     (let ((outname (format "~A.ly" (ly:parser-output-name parser)))
>           (locname (car (ly:input-file-line-char-column location))))
>          (if (or (string=? outname locname)(string-suffix? outname
> locname))
>              #{ \include $file #}
>              (make-music 'SequentialMusic 'void #t)))))
>
> \includeLocal "test.ily"
> --snip--
> this places the include in some context, generated by #{ #}.

Ah yes.  ly:parse-file does not help either?

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to