]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix Issue 1780: Scheme format functions with no destination parameter cause deprecati...
authorDavid Kastrup <dak@gnu.org>
Tue, 26 Jul 2011 07:43:14 +0000 (09:43 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 26 Jul 2011 07:43:14 +0000 (09:43 +0200)
28 files changed:
input/regression/profile-property-access.ly
input/regression/scheme-engraver-instance.ly
ly/graphviz-init.ly
ly/init.ly
ly/titling-init.ly
scm/backend-library.scm
scm/define-markup-commands.scm
scm/document-identifiers.scm
scm/document-translation.scm
scm/font.scm
scm/framework-eps.scm
scm/framework-ps.scm
scm/framework-scm.scm
scm/framework-socket.scm
scm/framework-svg.scm
scm/graphviz.scm
scm/layout-beam.scm
scm/lily-library.scm
scm/lily.scm
scm/output-lib.scm
scm/output-socket.scm
scm/output-svg.scm
scm/page.scm
scm/ps-to-png.scm
scm/stencil.scm
scm/translation-functions.scm
scripts/lilypond-invoke-editor.scm
scripts/musicxml2ly.py

index be8016ffa563e99cdf638ca92326cceaa0254457..13e811e0e5b3b02c60859f580c1273b9bb6592db 100644 (file)
@@ -34,7 +34,7 @@ Note: lilypond must be compiled with --disable-optimising for this file to work.
   (ly:progress "\n\n~A properties, top ~a rounded to ~a\n\n~a"
    what count rnd
    (string-join
-    (map (lambda (x) (format "~30a: ~6@a" (car x) (cdr x)))
+    (map (lambda (x) (format #f "~30a: ~6@a" (car x) (cdr x)))
      (ly:truncate-list! 
     (sort alist prop-stats>?) count))
     "\n"))))
index 4136171a102b551a970acbafe48957593f704f76..33296d1433d8d17f93d4498ba39e8148a22c3af1 100644 (file)
@@ -25,7 +25,7 @@
                     (set! private-note-counter (1+ private-note-counter))
                     (let ((text (ly:engraver-make-grob engraver 'TextScript event)))
                       (ly:grob-set-property! text 'text
-                                             (format "~a.~a" instance-id
+                                             (format #f "~a.~a" instance-id
                                                      private-note-counter))))))))))
   }
 }
index 2670858ffb03b8426a869d4efe2e978488913551..df797e4c0a179cdcc4ab958934476ba479197e08 100644 (file)
    (set! last-grob-action (assv-set! last-grob-action grob node-id))))
 
 #(define (truncate-value val)
-  (let ((val-str (format "~a" val)))
+  (let ((val-str (format #f "~a" val)))
    (string-take val-str (min 50 (string-length val-str)))))
 
 #(define (grob-mod grob file line func prop val)
   (let* ((val-str (truncate-value val))
-        (label (format "~a\\n~a:~a\\n~a <- ~a" (grob-name grob) file line prop val-str)))
+        (label (format #f "~a\\n~a:~a\\n~a <- ~a" (grob-name grob) file line prop val-str)))
    (if (relevant? grob file line prop)
        (grob-event-node grob label file))))
 
 #(define (grob-cache grob prop callback value)
   (let* ((val-str (truncate-value value))
-        (label (format "caching ~a.~a\\n~a -> ~a" (grob-name grob) prop callback value)))
+        (label (format #f "caching ~a.~a\\n~a -> ~a" (grob-name grob) prop callback value)))
    (if (relevant? grob #f #f prop)
        (grob-event-node grob label #f))))
 
 #(define (grob-create grob file line func)
-  (let ((label (format "~a\\n~a:~a" (grob-name grob) file line)))
+  (let ((label (format #f "~a\\n~a:~a" (grob-name grob) file line)))
    (grob-event-node grob label file)))
 
 #(ly:set-grob-modification-callback grob-mod)
index c27d8c840948e91ae399cb8be700b2b62a784602..380d9d2a0b2944265d07a773ef365205dee7d1d9 100644 (file)
@@ -25,7 +25,7 @@
 
 #(if (ly:get-option 'include-settings)
   (ly:parser-include-string parser
-    (format "\\include \"~a\"" (ly:get-option 'include-settings))))
+    (format #f "\\include \"~a\"" (ly:get-option 'include-settings))))
 
 \maininput
 %% there is a problem at the end of the input file
index 73fd17fe598106a3953cc0146b73ccce90bd223d..679742f29190cf87a086b6cadd404e902e393551 100644 (file)
@@ -16,7 +16,7 @@ tagline = \markup {
     %% 2014 = em dash.
 
     #(ly:export
-      (format "Music engraving by LilyPond ~a~awww.lilypond.org"
+      (format #f "Music engraving by LilyPond ~a~awww.lilypond.org"
        (lilypond-version)
        (ly:wide-char->utf-8 #x2014)
        ))
index 706bccb2de51a29a565501f9c8bbb29975b52fd5..93cd2c02d8b3e2ce30f38c851f7f5d06547f6edb 100644 (file)
         (base (dir-basename filename ".ps" ".eps"))
         (intermediate (remove (lambda (x) (member x formats)) completed)))
     (for-each (lambda (f)
-               ((eval (string->symbol (format "convert-to-~a" f))
+               ((eval (string->symbol (format #f "convert-to-~a" f))
                       module) paper-book filename)) completed)
     (if (ly:get-option 'delete-intermediate-files)
        (for-each (lambda (f)
index 3e8953afdf88f2f8e155c2f646dd59648c5d39e5..914ee2585d9e4e8b22a324164e1419c0ea3bf4e7 100644 (file)
@@ -684,7 +684,7 @@ rings = \\markup {
   ;; FIXME
   (ly:make-stencil
    (list 'embedded-ps
-        (format "
+        (format #f "
 gsave currentpoint translate
 0.1 setlinewidth
  ~a
@@ -2655,7 +2655,7 @@ Use the filled head if @var{filled} is specified.
 }
 @end lilypond"
   (let*
-      ((name (format "arrowheads.~a.~a~a"
+      ((name (format #f "arrowheads.~a.~a~a"
                     (if filled
                         "close"
                         "open")
@@ -2969,7 +2969,7 @@ Construct a note symbol, with stem.  By using fractional values for
 @end lilypond"
   (define (get-glyph-name-candidates dir log style)
     (map (lambda (dir-name)
-          (format "noteheads.~a~a" dir-name
+          (format #f "noteheads.~a~a" dir-name
                   (if (and (symbol? style)
                            (not (equal? 'default style)))
                       (select-head-glyph style (min log 2))
@@ -3451,7 +3451,7 @@ when @var{label} is not found."
                       (page-number (if (list? table)
                                        (assoc-get label table)
                                        #f))
-                      (page-markup (if page-number (format "~a" page-number) default))
+                      (page-markup (if page-number (format #f "~a" page-number) default))
                       (page-stencil (interpret-markup layout props page-markup))
                       (gap (- (interval-length x-ext)
                               (interval-length (ly:stencil-extent page-stencil X)))))
index ffccf72c30e06294902362e10ba4fc4703ac7fc5..b456acf334a14f6a4dc974ae9918813033259d20 100644 (file)
 
        (signature-str
        (string-join
-        (map (lambda (x) (format "@var{~a} (~a)"
+        (map (lambda (x) (format #f "@var{~a} (~a)"
                                  (car x)
                                  (cadr x)))
              (zip arg-names type-names)))))
-    (format
+    (format #f
      "@item @code{~a}~a~a
 @findex ~a
 ~a
@@ -60,7 +60,7 @@
 
 
 (define-public (identifiers-doc-string)
-  (format
+  (format #f
    "@table @asis
 ~a
 @end table
index 3e8c308d5b5a8a9a9657963c1d69e0f88192381c..b6afa8298b982d2468ac99e1c2e272e6370a89ac 100644 (file)
 
       (string-append
        "@item Set "
-       (format "grob-property @code{~a} "
+       (format #f "grob-property @code{~a} "
               (string-join (map symbol->string path) " "))
-       (format "in @ref{~a} to ~a."
+       (format #f "in @ref{~a} to ~a."
               context-sym (scm->texi value))
        "\n")))
      ((equal? (object-property context-sym 'is-grob?) #t) "")
      ((equal? tag 'assign)
-      (format "@item Set translator property @code{~a} to ~a.\n"
+      (format #f "@item Set translator property @code{~a} to ~a.\n"
              context-sym
              (scm->texi (car args))))
      )))
index 539e1aaee21ec42d4629a1c391b6db98b15546f1..db07a6d99809759f7d4bd77b26e75b6427f8de18 100644 (file)
@@ -185,7 +185,7 @@ used.  This is used to select the proper design size for the text fonts.
               ,(list->vector
                 (map (lambda (tup)
                        (cons (ly:pt (cdr tup))
-                             (format "~a-~a ~a"
+                             (format #f "~a-~a ~a"
                                      name
                                      (car tup)
                                      (ly:pt (cdr tup)))))
@@ -194,12 +194,12 @@ used.  This is used to select the proper design size for the text fonts.
                ,(list->vector
                  (map (lambda (size-tup)
                         (delay (ly:system-font-load
-                                (format "~a-~a" name (car size-tup)))))
+                                (format #f "~a-~a" name (car size-tup)))))
                       design-size-alist
                       )))
      (fetaBraces ,(ly:pt 20.0)
                 #(,(delay (ly:system-font-load
-                           (format "~a-brace" name)))))
+                           (format #f "~a-brace" name)))))
      )))
                 
 (define-public (add-pango-fonts node lily-family family factor)
index 4ab6e7bdddeb51174af286548e7a7bf63e3363b7..e67f278693325fc1496f68f7b98e33cae349b3d7 100644 (file)
@@ -74,7 +74,7 @@ alignment."
     "Return EPS filename."
     (let* ((stencil (car stencil-count-pair))
           (number (cdr stencil-count-pair))
-          (name (format "~a-~a" basename number)))
+          (name (format #f "~a-~a" basename number)))
       (dump-stencil-as-EPS paper stencil name
                           (ly:get-option 'include-eps-fonts))
       (string-append name ".eps")))
@@ -84,7 +84,7 @@ alignment."
   ;; finally write some auxiliary files if desired
   (dump-infinite-stack-EPS stencils)
   (postprocess-output book framework-eps-module
-                       (format "~a.eps" basename) (ly:output-formats))
+                       (format #f "~a.eps" basename) (ly:output-formats))
 
   ;; individual staves (*-1.eps etc.); only print if more than one stencil
   ;; Otherwise the .eps and the -1.eps file will be identical and waste space
@@ -103,7 +103,7 @@ alignment."
   (if create-aux-files
     (let* ((write-file (lambda (str-port ext)
                         (if create-aux-files
-                          (let* ((name (format "~a-systems.~a" basename ext))
+                          (let* ((name (format #f "~a-systems.~a" basename ext))
                                  (port (open-output-file name)))
                             (ly:message (_ "Writing ~a...") name)
                             (display (get-output-string str-port) port)
@@ -113,22 +113,21 @@ alignment."
           (count-system-port (open-output-string)))
       (for-each (lambda (c)
                  (if (< 0 c)
-                     (display (format
+                     (format tex-system-port
                                "\\ifx\\betweenLilyPondSystem \\undefined
   \\linebreak
 \\else
   \\expandafter\\betweenLilyPondSystem{~a}%
 \\fi
-" c)
-                              tex-system-port))
-                 (display (format "\\includegraphics{~a-~a}%\n"
-                                  basename (1+ c)) tex-system-port)
-                 (display (format "@image{~a-~a}\n"
-                                  basename (1+ c)) texi-system-port))
+" c))
+                 (format tex-system-port "\\includegraphics{~a-~a}%\n"
+                                  basename (1+ c))
+                 (format texi-system-port "@image{~a-~a}\n"
+                                  basename (1+ c)))
                (iota (length stencils)))
       (display "@c eof\n" texi-system-port)
       (display "% eof\n" tex-system-port)
-      (display (format "~a" (length stencils)) count-system-port)
+      (format count-system-port "~a" (length stencils))
       (write-file texi-system-port "texi")
       (write-file tex-system-port "tex")
       ;; do this as the last action so we know the rest is complete if
index 7c44920d67ef05e33cd35d1720036a5bc7777a97..e58b422b90ec58a6015f2ef30ef86bf7201b14f7 100644 (file)
@@ -90,7 +90,7 @@
   (ly:outputter-dump-string
    outputter
    (string-append
-    (format "%%Page: ~a ~a\n" page-number page-number)
+    (format #f "%%Page: ~a ~a\n" page-number page-number)
     "%%BeginPageSetup\n"
     (if landscape?
        "page-width output-scale lily-output-units mul mul 0 translate 90 rotate\n"
         (names (apply append (map extract-names fonts))))
     (apply string-append
           (map (lambda (f)
-                 (format
+                 (format #f
                   (if load-fonts?
                       "%%DocumentSuppliedResources: font ~a\n"
                       "%%DocumentNeededResources: font ~a\n")
                 "%%EndComments\n"))
 
 (define (procset file-name)
-  (format
+  (format #f
    "%%BeginResource: procset (~a) 1 0
 ~a
 %%EndResource
    file-name (cached-file-contents file-name)))
 
 (define (embed-document file-name)
-  (format "%%BeginDocument: ~a
+  (format #f "%%BeginDocument: ~a
 ~a
 %%EndDocument
 "
 (define-public (ps-embed-cff body font-set-name version)
   (let* ((binary-data
          (string-append
-          (format "/~a ~s StartData " font-set-name (string-length body))
+          (format #f "/~a ~s StartData " font-set-name (string-length body))
           body))
         (header
-         (format
+         (format #f
           "%%BeginResource: font ~a
 %!PS-Adobe-3.0 Resource-FontSet
 %%DocumentNeededResources: ProcSet (FontSetInit)
              (begin
                (set! file-name (ly:string-substitute (ly:get-option 'datadir)
                                                      "" file-name))
-               (format
+               (format #f
                 "lilypond-datadir (~a) concatstrings (r) file .loadfont\n"
                 file-name))
-             (format "(~a) (r) file .loadfont\n" file-name))
-         (format "% cannot find font file: ~a\n" file-name)))
+             (format #f "(~a) (r) file .loadfont\n" file-name))
+         (format #f "% cannot find font file: ~a\n" file-name)))
 
     (let* ((font (car font-name-filename))
           (name (cadr font-name-filename))
                (cond
                 ((internal-font? file-name)
                  (ps-load-file (ly:find-file
-                                (format "~a.otf" file-name))))
+                                (format #f "~a.otf" file-name))))
                 ((string? bare-file-name)
                  (ps-load-file file-name))
                 (else
 
 
 (define-public (output-framework basename book scopes fields)
-  (let* ((filename (format "~a.ps" basename))
+  (let* ((filename (format #f "~a.ps" basename))
         (outputter (ly:make-paper-outputter
                     ;; FIXME: better wrap open/open-file,
                     ;; content-mangling is always bad.
                     ;; FIXME: better wrap open/open-file,
                     ;; content-mangling is always bad.
                     ;; MINGW hack: need to have "b"inary for embedding CFFs
-                    (open-file (format "~a.eps" filename) "wb")
+                    (open-file (format #f "~a.eps" filename) "wb")
                     'ps))
         (port (ly:outputter-port outputter))
         (rounded-bbox (to-rounded-bp-box bbox))
              (bbox (list (car xext) (car yext)
                          (cdr xext) (cdr yext)))
              (filename (if (< 0 count)
-                           (format "~a-~a" basename count)
+                           (format #f "~a-~a" basename count)
                            basename)))
         (set! count (1+ count))
         (dump-stencil-as-EPS-with-bbox paper
                                        (ly:get-option 'include-eps-fonts)
                                        bbox)
         (if do-pdf
-            (postscript->pdf 0 0 (format "~a.eps" filename)))
+            (postscript->pdf 0 0 (format #f "~a.eps" filename)))
         (if do-png
             (postscript->png (ly:get-option 'resolution) 0 0
-                             (format "~a.eps" filename)))))
+                             (format #f "~a.eps" filename)))))
      extents-system-pairs)))
 
 (define-public (clip-system-EPSes basename paper-book)
       (for-each
        (lambda (region)
         (clip-systems-to-region
-         (format "~a-from-~a-to-~a-clip"
+         (format #f "~a-from-~a-to-~a-clip"
                  basename
                  (rhythmic-location->file-string (car region))
                  (rhythmic-location->file-string (cdr region)))
                (if (pair? system-list)
                    (clip-score-systems
                     (if (> count 0)
-                        (format "~a-~a" basename count)
+                        (format #f "~a-~a" basename count)
                         basename)
                     system-list)))
              score-system-list)))
                         (stack-stencils Y DOWN 0.0
                                         (map paper-system-stencil
                                              (reverse to-dump-systems)))
-                        (format "~a.preview" basename)
+                        (format #f "~a.preview" basename)
                         #t)
     (postprocess-output book framework-ps-module
-                       (format "~a.preview.eps" basename)
+                       (format #f "~a.preview.eps" basename)
                        (cons "png" (ly:output-formats)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 51a14463021909086fb09aab0260e62733cfdb04..a47eb185fd602112956fff3bf14e4f5caf5d30d4 100644 (file)
@@ -15,7 +15,7 @@
 (define format ergonomic-simple-format)
 
 (define-public (output-framework basename book scopes fields)
-  (let* ((file (open-output-file (format "~a.scm" basename))))
+  (let* ((file (open-output-file (format #f "~a.scm" basename))))
     
     (display ";;Creator: LilyPond\n" file)
     (display ";; raw SCM output\n" file)
index abaaa08ec9142fe65e35ad7ef24dc3dd30c20173..dd542935555cfb61e62d91cf27b8843998817cda 100644 (file)
@@ -36,7 +36,7 @@
 
 (define-public (output-framework channel book scopes fields)
   (let* ((ctor-arg (if (string? channel)
-                      (open-output-file (format "~a.socket" channel))
+                      (open-output-file (format #f "~a.socket" channel))
                       channel))
         (outputter (ly:make-paper-outputter
                     ctor-arg
                (let* ((system-stencil (paper-system-stencil x))
                       (x-extent (ly:stencil-extent system-stencil X))
                       (y-extent (ly:stencil-extent system-stencil Y)))
-                 (format ctor-arg (ly:format "system ~4l ~4l ~4l ~4l\n"
-                         (car x-extent) (car y-extent) (cdr x-extent) (cdr y-extent)))
+                 (display (ly:format "system ~4l ~4l ~4l ~4l\n"
+                         (car x-extent) (car y-extent) (cdr x-extent) (cdr y-extent)) ctor-arg)
                  (ly:outputter-dump-stencil outputter system-stencil)))
              systems)))
 
 (define-public (output-classic-framework channel book scopes fields)
   (let* ((ctor-arg (if (string? channel)
-                      (open-output-file (format "~a.socket" channel))
+                      (open-output-file (format #f "~a.socket" channel))
                       channel))
         (outputter (ly:make-paper-outputter
                     ctor-arg
                     'socket))
         (systems (ly:paper-book-systems book))
         (paper (ly:paper-book-paper book)))
-    (format ctor-arg (ly:format "paper ~4l\n" (get-page-dimensions paper)))
+    (display (ly:format "paper ~4l\n" (get-page-dimensions paper)) ctor-arg)
     (for-each (lambda (x)
                (let* ((system-stencil (paper-system-stencil x))
                       (x-extent (ly:stencil-extent system-stencil X))
                       (y-extent (ly:stencil-extent system-stencil Y)))
-                 (format ctor-arg (ly:format "system ~4l ~4l ~4l ~4l\n"
-                         (car x-extent) (car y-extent) (cdr x-extent) (cdr y-extent)))
+                 (display (ly:format "system ~4l ~4l ~4l ~4l\n"
+                         (car x-extent) (car y-extent) (cdr x-extent) (cdr y-extent)) ctor-arg)
                  (ly:outputter-dump-stencil outputter system-stencil)))
              systems)))
 
index f10125caa8d3e0e5a1932cf92ba4d27058b085f6..ad707a7b894f924bf42198fe222345b16761ec14 100644 (file)
@@ -132,7 +132,7 @@ src: url('~a');
        (module-remove! (ly:outputter-module outputter) 'paper))
     (if (ly:get-option 'svg-woff)
        (dump (woff-header paper (dirname filename))))
-    (dump (comment (format "Page: ~S/~S" page-number page-count)))
+    (dump (comment (format #f "Page: ~S/~S" page-number page-count)))
     (ly:outputter-output-scheme outputter
                                `(begin (set! lily-unit-length ,unit-length)
                                        ""))
@@ -178,11 +178,11 @@ src: url('~a');
         (page-count (length page-stencils))
         (filename "")
         (file-suffix (lambda (num)
-                       (if (= page-count 1) "" (format "-page-~a" num)))))
+                       (if (= page-count 1) "" (format #f "-page-~a" num)))))
     (for-each
       (lambda (page)
        (set! page-number (1+ page-number))
-       (set! filename (format "~a~a.svg"
+       (set! filename (format #f "~a~a.svg"
                               basename
                               (file-suffix page-number)))
        (dump-page paper filename page page-number page-count))
@@ -196,4 +196,4 @@ src: url('~a');
                  (stack-stencils Y DOWN 0.0
                                  (map paper-system-stencil
                                       (reverse to-dump-systems)))
-                 (format "~a.preview.svg" basename))))
+                 (format #f "~a.preview.svg" basename))))
index f6fd8fa9e44806b619f8e6cdb7183a8b2fb6fb04..ac60a9465033a35d5069ff800347ef24bda8dbb5 100644 (file)
   (let ((ns (nodes graph))
        (es (edges graph))
        (cs (clusters graph)))
-    (ly:message (format (_ "Writing graph `~a'...") (port-filename out)))
+    (ly:message (format #f (_ "Writing graph `~a'...") (port-filename out)))
     (display "digraph G {\nrankdir=\"LR\"\nnode [shape=rectangle]\n" out)
-    (map (lambda (n) (display (format "~a [label=\"~a\"]\n" (car n) (cdr n)) out))
-        ns)
-    (map (lambda (e) (display (format "~a -> ~a\n" (car e) (cdr e)) out))
-        es)
-    (map (lambda (c)
-         (display (format "subgraph cluster_~a {\nlabel= \"~a\"\ncolor=blue\n"
-                          (string-filter (car c) char-alphabetic?)
-                          (car c))
-                  out)
-         (map (lambda (n) (display (format "~a\n" n) out)) (cdr c))
-         (display "}\n" out))
-        cs)
+    (for-each (lambda (n) (format out "~a [label=\"~a\"]\n" (car n) (cdr n)))
+             ns)
+    (for-each (lambda (e) (format out "~a -> ~a\n" (car e) (cdr e)))
+             es)
+    (for-each (lambda (c)
+               (format out "subgraph cluster_~a {\nlabel= \"~a\"\ncolor=blue\n"
+                       (string-filter (car c) char-alphabetic?)
+                       (car c))
+               (for-each (lambda (n) (format out "~a\n" n)) (cdr c))
+               (display "}\n" out))
+             cs)
     (display "}" out)))
index 4ef49e975989978bfdeeb1af595aa567f76fc06f..aa35be0d63eb2684f78562f0fcd9319025607d1c 100644 (file)
@@ -40,7 +40,7 @@
          (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))))
+               (format #f "(~S,~S)" want-l want-r))))
     posns))))
 
 (define check-beam-slope-sign
@@ -54,7 +54,7 @@
          (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))))
 
index 0e2c810da912504b32010ab56219732712c2cf5b..ede65ff5e2a54b88d303e0a2429e3980384c7022 100644 (file)
@@ -179,14 +179,14 @@ bookoutput function"
   ;; as the key to out internal a-list
   (let* ((base-name (get-current-filename parser))
         (output-suffix (get-current-suffix parser))
-        (alist-key (format "~a~a" base-name output-suffix))
+        (alist-key (format #f "~a~a" base-name output-suffix))
         (counter-alist (ly:parser-lookup parser 'counter-alist))
         (output-count (assoc-get alist-key counter-alist 0))
         (result base-name))
     ;; Allow all ASCII alphanumerics, including accents
     (if (string? output-suffix)
         (set! result
-              (format "~a-~a"
+              (format #f "~a-~a"
                       result
                       (string-regexp-substitute
                        "[^-[:alnum:]]"
index 203a449c8f00f1e9d9c7108cb7a8cd045077777f..17c8d1776b2a2d436aa16798115f392170ea13c7 100644 (file)
@@ -585,7 +585,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
          (assoc-get 'total-cells-allocated  stats 0))))
 
 (define (dump-profile base last this)
-  (let* ((outname (format "~a.profile" (dir-basename base ".ly")))
+  (let* ((outname (format #f "~a.profile" (dir-basename base ".ly")))
         (diff (map (lambda (y) (apply - y)) (zip this last))))
     (ly:progress "\nWriting timing to ~a..." outname)
     (format (open-file outname "w")
@@ -622,18 +622,15 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
                         ".scm"))
         (outfile (open-file out-file-name "w")))
     (set! gc-dumping #t)
-    (display (format "Dumping GC statistics ~a...\n" out-file-name))
-    (display (map (lambda (y)
-                   (let ((x (car y))
-                         (c (cdr y)))
-                     (display
-                      (format "~a (~a) = ~a\n" (object-address x) c x)
-                      outfile)))
-                 (filter
-                  (lambda (x)
-                    (not (symbol? (car x))))
-                  protects))
-            outfile)
+    (format #t "Dumping GC statistics ~a...\n" out-file-name)
+    (for-each (lambda (y)
+               (let ((x (car y))
+                     (c (cdr y)))
+                 (format outfile "~a (~a) = ~a\n" (object-address x) c x)))
+             (filter
+              (lambda (x)
+                (not (symbol? (car x))))
+              protects))
     (format outfile "\nprotected symbols: ~a\n"
            (apply + (map (lambda (obj-count)
                            (if (symbol? (car obj-count))
@@ -659,13 +656,10 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
     (newline outfile)
     (let* ((stats (gc-stats)))
       (for-each (lambda (sym)
-                 (display
-                  (format "~a ~a ~a\n"
-                          gc-protect-stat-count
-                          sym
-                          (assoc-get sym stats "?"))
-
-                  outfile))
+                 (format outfile "~a ~a ~a\n"
+                         gc-protect-stat-count
+                         sym
+                         (assoc-get sym stats "?")))
                '(protected-objects bytes-malloced cell-heap-size)))
     (set! gc-dumping #f)
     (close-port outfile)))
@@ -686,7 +680,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
                                 (string-match "^VmData:[ \t]*([0-9]*) kB" l))
                               lines)))
         (mem (string->number (match:substring (car interesting) 1))))
-    (display (format  "VMDATA: ~a\n" mem))
+    (format #t "VMDATA: ~a\n" mem)
     (display (gc-stats))
     (if (> mem 100000)
        (begin (dump-gc-protects)
@@ -752,7 +746,7 @@ PIDs or the number of the process."
            (ly:set-option 'log-file "lilypond-multi-run"))
        (if (number? joblist)
            (begin (ly:set-option
-                   'log-file (format "~a-~a"
+                   'log-file (format #f "~a-~a"
                                      (ly:get-option 'log-file) joblist))
                   (set! files (vector-ref split-todo joblist)))
            (begin (ly:progress "\nForking into jobs:  ~a\n" joblist)
@@ -768,7 +762,7 @@ PIDs or the number of the process."
                    (lambda (x)
                      (let* ((job (car x))
                             (state (cdr x))
-                            (logfile (format "~a-~a.log"
+                            (logfile (format #f "~a-~a.log"
                                              (ly:get-option 'log-file) job))
                             (log (ly:gulp-file logfile))
                             (len (string-length log))
@@ -776,7 +770,7 @@ PIDs or the number of the process."
                        (if (status:term-sig state)
                            (ly:message
                             "\n\n~a\n"
-                            (format (_ "job ~a terminated with signal: ~a")
+                            (format #f (_ "job ~a terminated with signal: ~a")
                                     job (status:term-sig state)))
                            (ly:message
                             (_ "logfile ~a (exit ~a):\n~a")
@@ -794,7 +788,7 @@ PIDs or the number of the process."
                       (ly:exit 1 #f))))))
 
   (if (string-or-symbol? (ly:get-option 'log-file))
-      (ly:stderr-redirect (format "~a.log" (ly:get-option 'log-file)) "w"))
+      (ly:stderr-redirect (format #f "~a.log" (ly:get-option 'log-file)) "w"))
   (let ((failed (lilypond-all files)))
     (if (ly:get-option 'trace-scheme-coverage)
        (begin
@@ -813,7 +807,7 @@ PIDs or the number of the process."
         (ping-log
          (if separate-logs
              (open-file (if (string-or-symbol? (ly:get-option 'log-file))
-                            (format "~a.log" (ly:get-option 'log-file))
+                            (format #f "~a.log" (ly:get-option 'log-file))
                             "/dev/stderr") "a") #f))
         (do-measurements (ly:get-option 'dump-profile))
         (handler (lambda (key failed-file)
@@ -827,7 +821,7 @@ PIDs or the number of the process."
              (base (dir-basename x ".ly"))
              (all-settings (ly:all-options)))
         (if separate-logs
-            (ly:stderr-redirect (format "~a.log" base) "w"))
+            (ly:stderr-redirect (format #f "~a.log" base) "w"))
         (if ping-log
             (format ping-log "Processing ~a\n" base))
         (if (ly:get-option 'trace-memory-frequency)
index 1081377907907cd9860a8a14217798080bfe3034..5d4bdb1b617a1cc4b962eb7e8c6d27de5e554fa3 100644 (file)
@@ -333,7 +333,7 @@ and duration-log @var{log}."
 (define-public (tuplet-number::calc-fraction-text grob)
   (let ((ev (event-cause grob)))
 
-    (format "~a:~a"
+    (format #f "~a:~a"
            (ly:event-property ev 'denominator)
            (ly:event-property ev 'numerator))))
 
@@ -363,7 +363,7 @@ and duration-log @var{log}."
          (den (if denominator denominator (ly:event-property ev 'denominator)))
          (num (if numerator numerator (ly:event-property ev 'numerator))))
 
-    (format "~a:~a" den num)))
+    (format #f "~a:~a" den num)))
 
 ;; Print a tuplet fraction with note durations appended to the numerator and the
 ;; denominator
@@ -385,10 +385,10 @@ and duration-log @var{log}."
          (num (if numerator numerator (ly:event-property ev 'numerator))))
 
     (make-concat-markup (list
-                        (make-simple-markup (format "~a" den))
+                        (make-simple-markup (format #f "~a" den))
                         (markup #:fontsize -5 #:note denominatornote UP)
                         (make-simple-markup " : ")
-                        (make-simple-markup (format "~a" num))
+                        (make-simple-markup (format #f "~a" num))
                         (markup #:fontsize -5 #:note numeratornote UP)))))
 
 
index c86047815ade2ecc0a9ea9aec2074a91a58f77ef..310db4f58b45b6ba1b56ec7d3c97bdff9c448f15 100644 (file)
 ;;;
 
 (define (bezier-sandwich lst thick)
-  (format "bezier_sandwich ~a [~a]"
+  (format #f "bezier_sandwich ~a [~a]"
          thick
          (string-append
            (string-join (map
                           (lambda (x)
-                            (format "(~a,~a)" (car x) (cdr x)))
+                            (format #f "(~a,~a)" (car x) (cdr x)))
                           lst)
                         ","))))
 
 (define (draw-line thick x1 y1 x2 y2)
-  (format "drawline ~a ~a ~a ~a ~a"
+  (format #f "drawline ~a ~a ~a ~a ~a"
          thick x1 y2 x2 y2))
 
 (define (grob-cause offset grob)
@@ -75,7 +75,7 @@
                   (grob-bbox grob offset)))))
 
 (define (named-glyph font glyph)
-  (format "glyphshow ~a \"~a\" ~a \"~a\""
+  (format #f "glyphshow ~a \"~a\" ~a \"~a\""
          (ly:font-glyph-name-to-charcode font glyph)
          (ly:font-name font)
          (modified-font-metric-font-scaling font)
 
 (define (placebox x y s)
   (if (not (string-null? s))
-      (format "at ~a ~a ~a\n" x y s)
+      (format #f "at ~a ~a ~a\n" x y s)
       ""))
 
 (define (polygon xy-coords blot do-fill)
-  (format "polygon ~a ~a ~a"
+  (format #f "polygon ~a ~a ~a"
          blot
          (if do-fill "True" "False")
          (string-join (map number->string xy-coords))))
 
 (define (round-filled-box breapth width depth height blot-diameter)
-  (format "draw_round_box ~a ~a ~a ~a ~a"
+  (format #f "draw_round_box ~a ~a ~a ~a ~a"
          breapth width depth height blot-diameter))
 
 (define (utf-8-string descr string)
-  (format "utf-8 \"~a\" \"~a\""
+  (format #f "utf-8 \"~a\" \"~a\""
          (escape-string descr)
          ;; don't want unescaped spaces.
          (escape-string string)))
index 3132175414123ef86d6f360eccbe8f6296cc99f5..d993c356358c94fa21fe70f57c09e28cce49687b 100644 (file)
                      (value (cdr x)))
                  (if (number? value)
                      (set! value (ly:format "~4f" value)))
-                 (format " ~s=\"~a\"" attr value)))
+                 (format #f " ~s=\"~a\"" attr value)))
              attributes-alist)))
 
 (define-public (eo entity . attributes-alist)
   "o = open"
-  (format "<~S~a>\n" entity (attributes attributes-alist)))
+  (format #f "<~S~a>\n" entity (attributes attributes-alist)))
 
 (define-public (eoc entity . attributes-alist)
   "oc = open/close"
-  (format "<~S~a/>\n" entity (attributes attributes-alist)))
+  (format #f "<~S~a/>\n" entity (attributes attributes-alist)))
 
 (define-public (ec entity)
   "c = close"
-  (format "</~S>\n" entity))
+  (format #f "</~S>\n" entity))
 
 (define-public (comment s)
   (string-append "<!-- " s " -->\n"))
@@ -86,7 +86,7 @@
   (define (helper lst)
     (if (null? lst)
        '()
-       (cons (format "~S ~S" (car lst) (- (cadr lst)))
+       (cons (format #f "~S ~S" (car lst) (- (cadr lst)))
              (helper (cddr lst)))))
 
   (string-join (helper lst) " "))
 
 (define (dashed-line thick on off dx dy phase)
   (draw-line thick 0 0 dx dy
-            `(stroke-dasharray . ,(format "~a,~a" on off))))
+            `(stroke-dasharray . ,(format #f "~a,~a" on off))))
 
 (define (draw-line thick x1 y1 x2 y2 . alist)
   (apply entity 'line ""
                                  (closepath . z))
                                "")))
 
-         (cons (format "~a~a" svg-head (number-list->point args))
+         (cons (format #f "~a~a" svg-head (number-list->point args))
                (convert-path-exps (drop rest arity))))
        '()))
 
     '(fill . "currentColor")))
 
 (define (setcolor r g b)
-  (format "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
+  (format #f "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
          (* 100 r) (* 100 g) (* 100 b)))
 
 ;; rotate around given point
index f65c9559d3ca7510e695638c0c0ae3c949245bd9..0a30acef4dd0471f837cb2d5acf2c9bb6fcffe71 100644 (file)
@@ -69,7 +69,7 @@
  (lambda (j)
    (module-define!
     page-module
-    (string->symbol (format "page-~a" j))
+    (string->symbol (format #f "page-~a" j))
     (lambda (pg)
       (page-property pg j))))
 
index 17f822247b763286137855573b7bbcc1b90ea658..80bb58abcca28579c7ff3d6fe26477c13b27de79 100644 (file)
     (pixmap-format 'png16m)
     (anti-alias-factor 1))
 
-   (let* ((format-str (format "~a" pixmap-format))
+   (let* ((format-str (format #f "~a" pixmap-format))
          (extension (cond
                      ((string-contains format-str "png") "png")
                      ((string-contains format-str "jpg") "jpeg")
                      (else
                       (ly:error "Unknown pixmap format ~a" pixmap-format))))
          (base (dir-basename ps-name ".ps" ".eps"))
-         (png1 (format "~a.~a" base extension))
-         (pngn (format  "~a-page%d.~a" base extension))
+         (png1 (format #f "~a.~a" base extension))
+         (pngn (format #f "~a-page%d.~a" base extension))
          (page-count (ps-page-count ps-name))
          (multi-page? (> page-count 1))
          (output-file (if multi-page? pngn png1))
           (if multi-page?
               (map
                (lambda (n)
-                 (format "~a-page~a.png" base (1+ n)))
+                 (format #f "~a-page~a.png" base (1+ n)))
                (iota page-count))
-              (list (format "~a.png" base))))
+              (list (format #f "~a.png" base))))
      
      (if (not (= 0 status))
         (begin
index 64f48cc89df75604f2b1a47b0bf085d2a8624686..2f31d343f5d020b6e46cff7039123a2917a070f3 100644 (file)
@@ -640,7 +640,7 @@ with optional arrows of @code{max-size} on start and end controlled by
                             (markup #:whiteout
                                     #:simple (cond
                                               ((interval-empty? extent)
-                                               (format "empty"))
+                                               "empty")
                                               (is-length
                                                (ly:format "~$" (interval-length extent)))
                                               (else
index 94862688fdb522ec369130ae485000983bafc582..314e66ff59b8783263efcbcaa36f0f721a240f18 100644 (file)
@@ -565,7 +565,7 @@ only ~a fret labels provided")
 (define-public (fret-number-tablature-format
                 context string-number fret-number)
   (make-vcenter-markup
-    (format "~a" fret-number)))
+    (format #f "~a" fret-number)))
 
 ;; The 5-string banjo has got a extra string, the fifth (duh), which
 ;; starts at the fifth fret on the neck.  Frets on the fifth string
index 230b1761d44c1118f69908af2a59bd3823f2ac39..e993378cb873df9d0457b264044d6cbd23872829 100644 (file)
@@ -129,7 +129,7 @@ Options:
 (define (run-browser uri)
   (system
    (if (getenv "BROWSER")
-       (format "~a ~a" (getenv "BROWSER") uri)
+       (format #f "~a ~a" (getenv "BROWSER") uri)
        (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
 
 
index defc576b1f6748971657f83f0f2e189847579b04..2b630029b6223bbb061580201fa54f3874d66c31 100644 (file)
@@ -68,7 +68,7 @@ additional_definitions = {
     (let* ((ev (event-cause grob))
            (den (if denominator denominator (ly:event-property ev 'denominator)))
            (num (if numerator numerator (ly:event-property ev 'numerator))))
-       (format "~a:~a" den num)))
+       (format #f "~a:~a" den num)))
 """,
 }