]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/layout-beam.scm
Merge remote branch 'origin/release/unstable' into HEAD
[lilypond.git] / scm / layout-beam.scm
index 5d5d190c2d01ca769622d45f4f832c11b68569c8..f72afacf0dd1c8ffbcc5972ff760a40e375906e7 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2000--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2000--2012 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -15,7 +15,9 @@
 ;;;; You should have received a copy of the GNU General Public License
 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-(define ((check-beam-quant posl posr) beam posns)
+(define check-beam-quant
+  (lambda (posl posr)
+    (lambda (beam posns)
   "Check whether BEAM has POSL and POSR quants.  POSL are (POSITION
 . QUANT) pairs, where QUANT is -1 (hang), 0 (center), 1 (sit) or -2/ 2 (inter) 
 
          (ly:warning (_ "Error in beam quanting.  Expected (~S,~S) found ~S.")
                      want-l want-r posns)
          (set! (ly:grob-property beam 'annotation)
-               (format "(~S,~S)" want-l want-r))))
-    posns
-    ))
+               (format #f "(~S,~S)" want-l want-r))))
+    posns))))
 
-
-(define ((check-beam-slope-sign comparison) beam posns)
+(define check-beam-slope-sign
+  (lambda (comparison)
+    (lambda (beam posns)
   "Check whether the slope of BEAM is correct wrt. COMPARISON."
   (let* ((slope-sign (- (cdr posns) (car posns)))
         (correct (comparison slope-sign 0)))
          (ly:warning (_ "Error in beam quanting.  Expected ~S 0, found ~S.")
                      (procedure-name comparison) slope-sign)
          (set! (ly:grob-property beam 'annotation)
-               (format "~S 0" (procedure-name comparison))))
+               (format #f "~S 0" (procedure-name comparison))))
        (set! (ly:grob-property beam 'annotation) ""))
-    posns))
+    posns))))
 
 
 (define-public (check-quant-callbacks l r)
-  (list ly:beam::calc-least-squares-positions
-       ly:beam::slope-damping
-       ly:beam::shift-region-to-valid
-       ly:beam::quanting
-       (check-beam-quant l r)
-       ))
+  (lambda (grob)
+    ((check-beam-quant l r)
+       grob
+       (beam::place-broken-parts-individually grob))))
 
 
 (define-public (check-slope-callbacks comparison)
-  (list ly:beam::calc-least-squares-positions
-       ly:beam::slope-damping
-       ly:beam::shift-region-to-valid
-       ly:beam::quanting
-       (check-beam-slope-sign comparison)      
-       ))
+  (lambda (grob)
+    ((check-beam-slope-sign comparison)
+       grob
+       (beam::place-broken-parts-individually grob))))