]> git.donarmstrong.com Git - lilypond.git/commitdiff
use fancy-format for ice-9 format
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 10 Jun 2007 04:09:30 +0000 (01:09 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 10 Jun 2007 04:09:30 +0000 (01:09 -0300)
scm/clip-region.scm
scm/fret-diagrams.scm
scm/lily.scm

index eaf473058af7371ed6c0aabbe40ae9cfb0e0841e..c8eb537b255116872103570a271eb8172d7ef32b 100644 (file)
 
 
 (define-public (rhythmic-location->file-string a)
-  (format "~a.~a.~a"
+  (ly:format "~a.~a.~a"
          (car a)
          (ly:moment-main-numerator (cdr a))
          (ly:moment-main-denominator (cdr a))))
 
 (define-public (rhythmic-location->string a)
-  (format "bar ~a ~a"
+  (ly:format "bar ~a ~a"
          (car a)
          (ly:moment->string  (cdr a))))
 
index 5f69f817de3a8c8a83358c8d7301ac1613c13663..6112d8ad7731b3d26855cd673ed0ec2744350b5d 100644 (file)
@@ -397,10 +397,10 @@ Line thickness is given by @var{th}, fret & string spacing by
           (fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
            (label-text 
               (cond
-              ((equal?   number-type  'roman-lower) (format #f "~(~:@r~)" base-fret))
-              ((equal?  number-type 'roman-upper) (format #f "~:@r" base-fret))
-              ((equal? 'arabic number-type)  (format #f "~d" base-fret))
-              (else (format #f  "~(~:@r~)" base-fret)))))
+              ((equal?   number-type  'roman-lower) (fancy-format #f "~(~:@r~)" base-fret))
+              ((equal?  number-type 'roman-upper) (fancy-format #f "~:@r" base-fret))
+              ((equal? 'arabic number-type)  (fancy-format #f "~d" base-fret))
+              (else (fancy-format #f  "~(~:@r~)" base-fret)))))
        (if (eq? orientation 'normal)
            (ly:stencil-translate-axis
                (sans-serif-stencil layout props (* size label-font-mag) label-text)
index b85f354e006ebf3c6d0ae46663abae39acd28bb7..645e2c192c7865ad79fe6164f3b3c2503672a0e7 100644 (file)
@@ -103,6 +103,7 @@ on errors, and print a stack trace.")
 
 (use-modules (ice-9 regex)
             (ice-9 safe)
+            (ice-9 format)
             (ice-9 rdelim)
              (ice-9 optargs)
             (oop goops)
@@ -113,6 +114,7 @@ on errors, and print a stack trace.")
             (scm memory-trace)
             (scm coverage)
             )
+(define-public fancy-format format)
 (define-public (ergonomic-simple-format dest . rest)
   "Like ice-9 format, but without the memory consumption."
   
@@ -120,7 +122,6 @@ on errors, and print a stack trace.")
       (apply simple-format (cons #f (cons dest rest)))
       (apply simple-format (cons dest rest))))
 
-
 (define format ergonomic-simple-format)
 
 ;; my display