]> git.donarmstrong.com Git - lilypond.git/blob - ly/init.ly
Merge with master
[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 #(define output-empty-score-list #f)
19
20 #(use-modules (scm clip-region))
21 \maininput
22 %% there is a problem at the end of the input file
23
24 %%
25 %% Above and below comments compensate for the parser's look-ahead.
26 %%
27
28 #(if (and (ly:get-option 'old-relative)
29       (defined? 'input-file-name)
30       (not (ly:get-option 'old-relative-used)))
31   (old-relative-not-used-message input-file-name))%% there is a problem at the end of the input file
32
33 #(if (and (not version-seen)
34       (defined? 'input-file-name))
35   (version-not-seen-message input-file-name))
36
37 #(if (or (pair? toplevel-scores) output-empty-score-list)
38   ((if (defined? 'default-toplevel-book-handler)
39     default-toplevel-book-handler
40     toplevel-book-handler)
41    parser
42    (apply ly:make-book $defaultpaper $defaultheader toplevel-scores)))
43
44
45 #(if (eq? expect-error (ly:parser-has-error? parser))
46   (ly:parser-clear-error parser)
47   (if expect-error
48    (ly:parser-error parser (_ "expected error, but none found"))))