;; Abbrv-PWR!
(defmacro-public _i (x) x)
+(read-enable 'positions)
+(debug-enable 'debug)
+
+
(define (define-scheme-options)
(for-each (lambda (x)
(ly:add-option (car x) (cadr x) (caddr x)))
(show-available-fonts #f
"List font names available.")
(verbose ,(ly:command-line-verbose?) "value for the --verbose flag")
- )))
+ ))
+
+ (map
+ (lambda (x)
+ (ly:set-option (car x) (cdr x)))
+ (eval-string (ly:command-line-options))))
;; need to do this in the beginning. Other parts of the
;;
(define-scheme-options)
+
+
(debug-set! stack 0)
(if (defined? 'set-debug-cell-accesses!)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; other files.
-(for-each ly:load
- ;; load-from-path
- '("lily-library.scm"
+
+(define
+ init-scheme-files
+ '("lily-library.scm"
"file-cache.scm"
"define-event-classes.scm"
"define-music-types.scm"
"safe-lily.scm"))
+
+
+(for-each ly:load init-scheme-files)
+
+
(set! type-p-name-alist
`(
(,boolean-or-symbol? . "boolean or symbol")
(define-public (lilypond-main files)
"Entry point for LilyPond."
-
+
(define (no-files-handler)
(ly:usage)
(exit 2))
+ (eval-string (ly:command-line-code))
+
(if (ly:get-option 'gui)
(gui-main files))
(if (string-or-symbol? (ly:get-option 'log-file))
(ly:stderr-redirect (format "~a.log" (ly:get-option 'log-file)) "w"))
+
(let ((failed (lilypond-all files)))
(if (pair? failed)
(exit 0)))))
(define-public (lilypond-all files)
-
+
(if (ly:get-option 'show-available-fonts)
(begin
(if (ly:get-option 'dump-profile)
(dump-profile "lily-run-total" '(0 0) (profile-measurements)))
-
+
failed))
(define (lilypond-file handler file-name)