]> git.donarmstrong.com Git - lilypond.git/blob - scm/safe-lily.scm
0be4f8c558ea1d98854c4644e3fc49f3637ce007
[lilypond.git] / scm / safe-lily.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;
5 ;;;; LilyPond is free software: you can redistribute it and/or modify
6 ;;;; it under the terms of the GNU General Public License as published by
7 ;;;; the Free Software Foundation, either version 3 of the License, or
8 ;;;; (at your option) any later version.
9 ;;;;
10 ;;;; LilyPond is distributed in the hope that it will be useful,
11 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ;;;; GNU General Public License for more details.
14 ;;;;
15 ;;;; You should have received a copy of the GNU General Public License
16 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
17
18 (map
19  (lambda (sym)
20    (set! safe-objects (cons (cons sym (primitive-eval sym))
21                             safe-objects)))
22  '(ly:add-interface
23    ly:moment-add
24    ly:all-grob-interfaces
25    ly:all-output-backend-commands
26    ly:all-stencil-expressions
27    ly:bracket
28    ly:context-find
29    ly:context-id
30    ly:context-name
31    ly:context-parent
32    ly:context-property
33    ly:context-property-where-defined
34    ly:context-pushpop-property
35    ly:context-set-property!
36    ly:context-unset-property
37    ly:context?
38    ly:dimension?
39    ly:dir?
40    ly:moment-div
41    ly:duration-dot-count
42    ly:duration-factor
43    ly:duration-log
44    ly:duration<?
45    ly:duration?
46    ly:error
47    ly:font-get-glyph
48    ly:font-design-size
49    ly:font-file-name
50    ly:font-magnification
51    ly:font-metric?
52    ly:font-name
53    ly:format-output
54    ly:get-all-function-documentation
55    ly:get-all-translators
56    ly:get-option
57    ly:grob-alist-chain
58    ly:grob-default-font
59    ly:grob-extent
60    ly:grob-original
61    ly:grob-layout
62    ly:grob-parent
63    ly:grob-property
64    ly:grob-script-priority-less
65    ly:grob-set-property!
66    ly:grob-staff-position
67    ly:grob-suicide!
68    ly:grob-system
69    ly:grob-translate-axis!
70    ly:grob?
71    ly:input-file-line-char-column
72    ly:input-location?
73    ly:input-message
74    ly:intlog2
75    ly:item-break-dir
76    ly:item?
77    ly:iterator?
78    ly:make-music
79    ly:make-duration
80    ly:make-moment
81    ly:make-music-function
82    ly:make-pitch
83    ly:make-stencil
84    ly:moment<?
85    ly:moment?
86    ly:moment-mul
87    ly:music-compress
88    ly:music-deep-copy
89    ly:music-duration-compress
90    ly:music-duration-length
91    ly:music-length
92    ly:music-list?
93    ly:music-mutable-properties
94    ly:music-property
95    ly:make-score
96    ly:music-set-property!
97    ly:music-transpose
98    ly:music?
99    ly:lily-parser?
100    ly:message
101    ly:number->string
102    ly:option-usage
103    ly:output-def-clone
104    ly:output-def-lookup
105    ly:output-def-scope
106    ly:output-description
107    ly:paper-book?
108    ly:prob-property
109    ly:output-def?
110    ly:paper-get-font
111    ly:paper-get-number
112    ly:paper-system?
113    ly:parser-parse-string
114    ly:pitch-alteration
115    ly:pitch-diff
116    ly:pitch-notename
117    ly:pitch-octave
118    ly:pitch-quartertones
119    ly:pitch-semitones
120    ly:pitch-steps
121    ly:pitch-transpose
122    ly:pitch<?
123    ly:pitch?
124    ly:position-on-line?
125    ly:round-filled-box
126    ly:run-translator
127    ly:set-option
128    ly:spanner-broken-into
129    ly:spanner-bound
130    ly:spanner?
131    ly:staff-symbol-line-thickness
132    ly:stencil-add
133    ly:stencil-aligned-to
134    ly:stencil-combine-at-edge
135    ly:stencil-expr
136    ly:stencil-extent
137    ly:stencil-translate
138    ly:stencil-translate-axis
139    ly:stencil?
140    ly:translator-description
141    ly:translator-name
142    ly:translator?
143    ly:transpose-key-alist
144    ly:unit
145    ly:usage
146    ly:version
147    ly:vsize?
148    ly:warning
149
150    ;; FIXME: cannot change staff size in --safe-mode
151    ;;$defaultpaper
152    ;;$defaultmidi
153    ;;$defaultlayout
154
155    ly:accidental-interface::print
156    ly:arpeggio::print
157    ly:arpeggio::brew-chord-bracket
158    ly:bar-line::print
159    ly:breathing-sign::offset-callback
160    ly:clef::print
161    ly:cluster::print
162    ly:cluster-beacon::height
163    ly:custos::print
164    ly:dots::print
165    ly:hairpin::print
166    ly:hara-kiri-group-spanner::force-hara-kiri-callback
167    ly:hara-kiri-group-spanner::y-extent
168    ly:horizontal-bracket::print
169    ly:lyric-hyphen::print
170    ly:lyric-hyphen::set-spacing-rods
171    ly:key-signature-interface::print
172    ly:line-spanner::print
173    ly:lyric-extender::print
174    ly:measure-grouping::print
175    ly:mensural-ligature::brew-ligature-primitive
176    ly:mensural-ligature::print
177    ly:multi-measure-rest::percent
178    ly:multi-measure-rest::print
179    ly:multi-measure-rest::set-spacing-rods
180    ly:note-head::print
181    ly:ottava-bracket::print
182    ly:paper-column::print
183    ly:percent-repeat-item-interface::beat-slash
184    ly:percent-repeat-item-interface::double-percent
185    ly:piano-pedal-bracket::print
186    ly:rest::print
187    ly:script-interface::print
188    ly:slur::height
189    ly:slur::print
190    ly:spacing-spanner::set-springs
191    ly:span-bar::print
192    ly:spanner::set-spacing-rods
193    ly:staff-symbol::print
194    ly:staff-symbol-referencer::callback
195    ly:stem::height
196    ly:stem::offset-callback
197    ly:stem::print
198    ly:stem-tremolo::print
199    ly:sustain-pedal::print
200    ly:system-start-delimiter::print
201    ly:text-interface::print
202    ly:tie::print
203    ly:time-signature::print
204    ly:tuplet-bracket::print
205    ly:vaticana-ligature::brew-ligature-primitive
206    ly:vaticana-ligature::print
207    ly:volta-bracket-interface::print
208    ))
209
210 (define-public (make-safe-lilypond-module)
211   (let* ((m (make-safe-module)))
212     (for-each (lambda (p) (module-define! m (car p) (cdr p))) safe-objects)
213     m))