(srfi srfi-14)
(scm clip-region)
(scm memory-trace)
- (scm coverage))
+ (scm coverage)
+ (scm safe-utility-defs))
(define-public _ gettext)
;;; There are new modules defined in Guile V2.0 which we need to use.
(fresh-interface!))))
(set-module-obarray! iface (module-obarray mod))))))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Safe definitions utility
-
-(define safe-objects
- (list))
-
-(define-macro (define-safe-public arglist . body)
- "Define a variable, export it, and mark it as safe, i.e. usable in
-LilyPond safe mode. The syntax is the same as `define*-public'."
- (define (get-symbol arg)
- (if (pair? arg)
- (get-symbol (car arg))
- arg))
-
- (let ((safe-symbol (get-symbol arglist)))
- `(begin
- (define*-public ,arglist
- ,@body)
- (set! safe-objects (cons (cons ',safe-symbol ,safe-symbol)
- safe-objects))
- ,safe-symbol)))
(define-safe-public (lilypond-version)
(string-join
`((,boolean-or-symbol? . "boolean or symbol")
(,color? . "color")
(,cheap-list? . "list")
+ (,fraction? . "fraction, as pair")
(,grob-list? . "list of grobs")
;; this is built on cheap-list
(,list-or-symbol? . "list or symbol")
(,markup-command-list? . "markup command list")
(,markup-list? . "markup list")
(,moment-pair? . "pair of moment objects")
+ (,number-list? . "number list")
(,number-or-grob? . "number or grob")
(,number-or-pair? . "number or pair")
(,number-or-string? . "number or string")