]> git.donarmstrong.com Git - lilypond.git/blob - ly/init.ly
Allow --safe testing as a snippet.
[lilypond.git] / ly / init.ly
1 %% Toplevel initialisation file. 
2
3 %% switch on debugging.
4 #(if (and #t (defined? 'set-debug-cell-accesses!))
5   (set-debug-cell-accesses! 5000))
6
7 \version "2.10.0"
8
9 \include "declarations-init.ly"
10
11
12 #(ly:set-option 'old-relative #f)
13 #(define toplevel-scores '())
14 #(define output-count 0) 
15 #(define $defaultheader #f)
16 #(define version-seen #f)
17 #(define expect-error #f) 
18
19 #(use-modules (scm clip-region))
20 \maininput
21 %% there is a problem at the end of the input file
22
23 %%
24 %% Above and below comments compensate for the parser's look-ahead.
25 %%
26
27 #(if (and (ly:get-option 'old-relative)
28       (defined? 'input-file-name)
29       (not (ly:get-option 'old-relative-used)))
30   (old-relative-not-used-message input-file-name))%% there is a problem at the end of the input file
31
32 #(if (and (not version-seen)
33       (defined? 'input-file-name))
34   (version-not-seen-message input-file-name))
35
36 #(if (pair? toplevel-scores)
37   ((if (defined? 'default-toplevel-book-handler)
38     default-toplevel-book-handler
39     toplevel-book-handler)
40    parser
41    (apply ly:make-book $defaultpaper $defaultheader toplevel-scores)))
42
43
44 #(if expect-error
45   (ly:parser-clear-error parser))