]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Apply scripts/auxiliar/fixscm.sh
[lilypond.git] / scm / lily.scm
index 2028f1c20e652df058c538fd796f4051d0a45dc2..f227adc5b99377995e8cd35fbc955c8db44f053c 100644 (file)
@@ -120,13 +120,13 @@ variables in the current module as well as those defined with
 ignore @var{thunk} and instead just reinitialize all recorded
 variables to their value after the initial call of @var{thunk}."
 
-;; We need to save the variables of the current module along with
-;; their values: functions defined in the module might refer to the
-;; variables.
+  ;; We need to save the variables of the current module along with
+  ;; their values: functions defined in the module might refer to the
+  ;; variables.
 
-;; The entries in lilypond-declarations consist of a cons* consisting
-;; of symbol, variable, and value.  Variables defined with
-;; define-session have the symbol set to #f.
+  ;; The entries in lilypond-declarations consist of a cons* consisting
+  ;; of symbol, variable, and value.  Variables defined with
+  ;; define-session have the symbol set to #f.
 
   (if (ly:undead? lilypond-declarations)
       (begin
@@ -169,7 +169,7 @@ variables to their value after the initial call of @var{thunk}."
     ;; be longer than 48 characters per line.
 
     (anti-alias-factor 1
-"Render at higher resolution
+                       "Render at higher resolution
 (using given factor) and scale down result to prevent jaggies in
 PNG images.")
     (aux-files
@@ -379,7 +379,7 @@ messages into errors.")
              (scm clip-region)
              (scm memory-trace)
              (scm coverage)
-            (scm safe-utility-defs))
+             (scm safe-utility-defs))
 
 (define-public _ gettext)
 ;;; There are new modules defined in Guile V2.0 which we need to use.
@@ -389,11 +389,11 @@ messages into errors.")
 ;;
 
 (cond
 ((guile-v2)
-   (ly:debug (_ "Using (ice-9 curried-definitions) module\n"))
-   (use-modules (ice-9 curried-definitions)))
 (else
-    (ly:debug (_ "Guile 1.8\n"))))
+ ((guile-v2)
+  (ly:debug (_ "Using (ice-9 curried-definitions) module\n"))
+  (use-modules (ice-9 curried-definitions)))
+ (else
+  (ly:debug (_ "Guile 1.8\n"))))
 
 ;; TODO add in modules for V1.8.7 deprecated in V2.0 and integrated
 ;; into Guile base code, like (ice-9 syncase).
@@ -469,8 +469,8 @@ messages into errors.")
   (if (string-index x #\\)
       x
       (string-regexp-substitute
-        "//*" "/"
-        (string-regexp-substitute "\\\\" "/" x))))
+       "//*" "/"
+       (string-regexp-substitute "\\\\" "/" x))))
 
 (define-public (ly-getcwd)
   (if (eq? PLATFORM 'windows)
@@ -588,7 +588,7 @@ messages into errors.")
     "x11-color.scm"))
 ;;  - Files to be loaded last
 (define init-scheme-files-tail
-;;  - must be after everything has been defined
+  ;;  - must be after everything has been defined
   '("safe-lily.scm"))
 ;;
 ;; Now construct the load list
@@ -643,7 +643,7 @@ messages into errors.")
 
 (define-public guile-predicates
   `((,hash-table? . "hash table")
-  ))
+    ))
 
 (define-public lilypond-scheme-predicates
   `((,boolean-or-symbol? . "boolean or symbol")
@@ -777,10 +777,10 @@ messages into errors.")
                          (lambda (a b)
                            (< (object-address (car a))
                               (object-address (car b))))))
-        (out-file-name (string-append
-                       "gcstat-" (number->string gc-protect-stat-count)
-                       ".scm"))
-        (outfile (open-file out-file-name "w")))
+         (out-file-name (string-append
+                         "gcstat-" (number->string gc-protect-stat-count)
+                         ".scm"))
+         (outfile (open-file out-file-name "w")))
     (set! gc-dumping #t)
     (ly:progress "Dumping GC statistics ~a...\n" out-file-name)
     (for-each (lambda (y)
@@ -810,13 +810,13 @@ messages into errors.")
           (ly:set-option 'debug-gc-assert-parsed-dead #t)
           (gc)
           (ly:set-option 'debug-gc-assert-parsed-dead #f)
-         (for-each
-          (lambda (x)
-            (if (not (hashq-ref gc-zombies x))
-                (begin
-                  (ly:programming-error "Parsed object should be dead: ~a" x)
-                  (hashq-set! gc-zombies x #t))))
-          (ly:parsed-undead-list!))
+          (for-each
+           (lambda (x)
+             (if (not (hashq-ref gc-zombies x))
+                 (begin
+                   (ly:programming-error "Parsed object should be dead: ~a" x)
+                   (hashq-set! gc-zombies x #t))))
+           (ly:parsed-undead-list!))
           (set! stats (gc-live-object-stats))
           (ly:progress "Dumping live object statistics.\n")
           (dump-live-object-stats outfile)))
@@ -862,9 +862,9 @@ PIDs or the number of the process."
   (define (helper count acc)
     (if (> count 0)
         (let* ((pid (primitive-fork)))
-              (if (= pid 0)
-                  (1- count)
-                  (helper (1- count) (cons pid acc))))
+          (if (= pid 0)
+              (1- count)
+              (helper (1- count) (cons pid acc))))
         acc))
 
   (helper count '()))
@@ -916,7 +916,7 @@ PIDs or the number of the process."
             (begin (ly:set-option
                     'log-file (format #f "~a-~a"
                                       (ly:get-option 'log-file) joblist))
-                    (set! files (vector-ref split-todo joblist)))
+                   (set! files (vector-ref split-todo joblist)))
             (begin (ly:progress "\nForking into jobs:  ~a\n" joblist)
                    (for-each
                     (lambda (pid)
@@ -924,7 +924,7 @@ PIDs or the number of the process."
                         (if (not (= stat 0))
                             (set! errors
                                   (acons (list-element-index joblist pid)
-                                 stat errors)))))
+                                         stat errors)))))
                     joblist)
                    (for-each
                     (lambda (x)
@@ -943,17 +943,17 @@ PIDs or the number of the process."
                             (ly:message
                              (_ "logfile ~a (exit ~a):\n~a")
                              logfile (status:exit-val state) tail))))
-                      errors)
-                     (if (pair? errors)
-                         (ly:error "Children ~a exited with errors."
-                                   (map car errors)))
-                     ;; must overwrite individual entries
-                     (if (ly:get-option 'dump-profile)
-                         (dump-profile "lily-run-total"
-                                       '(0 0) (profile-measurements)))
-                     (if (null? errors)
-                         (ly:exit 0 #f)
-                         (ly:exit 1 #f))))))
+                    errors)
+                   (if (pair? errors)
+                       (ly:error "Children ~a exited with errors."
+                                 (map car errors)))
+                   ;; must overwrite individual entries
+                   (if (ly:get-option 'dump-profile)
+                       (dump-profile "lily-run-total"
+                                     '(0 0) (profile-measurements)))
+                   (if (null? errors)
+                       (ly:exit 0 #f)
+                       (ly:exit 1 #f))))))
 
   (if (string-or-symbol? (ly:get-option 'log-file))
       (ly:stderr-redirect (format #f "~a.log" (ly:get-option 'log-file)) "w"))