]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 5107 Fix some warnings about string-delete and
authorThomas Morley <thomasmorley65@gmail.com>
Sat, 26 Nov 2016 12:38:51 +0000 (13:38 +0100)
committerThomas Morley <thomasmorley65@gmail.com>
Sun, 2 Apr 2017 08:41:17 +0000 (10:41 +0200)
 string-filter argument order

This makes guile2 stop printing some warning messages:

  Guile used to use the wrong argument order for string-delete.
  This call to string-filter had the arguments in the wrong order.
  See SRFI-13 for more details. At some point we will remove this hack.

guile-1.8 will continue working.

scm/graphviz.scm
scm/lily-library.scm
scm/lily.scm

index 61fa5b1e1b7c3158f97864068cd8eeb6d6f939fe..657fdb23b3e00e5233c583ad8b31bd19ea4c4c84 100644 (file)
@@ -69,7 +69,9 @@
               es)
     (for-each (lambda (c)
                 (format out "subgraph cluster_~a {\nlabel= \"~a\"\ncolor=blue\n"
-                        (string-filter (car c) char-alphabetic?)
+                        (if (guile-v2)
+                            (string-filter char-alphabetic? (car c))
+                            (string-filter (car c) char-alphabetic?))
                         (car c))
                 (for-each (lambda (n) (format out "~a\n" n)) (cdr c))
                 (display "}\n" out))
index c6f066ca3284918723d1be4b8a859d8801f2c2a8..05875b2da2ec5915d7d4c99ae5c89489e9a13986 100644 (file)
@@ -778,9 +778,9 @@ as rectangular coordinates @code{(x-length . y-length)}."
 
 (define-public (remove-whitespace strg)
 "Remove characters satisfying @code{char-whitespace?} from string @var{strg}"
-  (string-delete
-    strg
-    char-whitespace?))
+  (if (guile-v2)
+      (string-delete char-whitespace? strg)
+      (string-delete strg char-whitespace?)))
 
 (define-public (string-encode-integer i)
   (cond
index d4553eec19fe74103f772abcf001a7fe7225cf54..4b3c9c7e1c4cad55c64a53fe611d1effcf692612 100644 (file)
@@ -963,7 +963,11 @@ PIDs or the number of the process."
             (remove string-null?
                     (append-map
                      (lambda (f)
-                       (string-split (string-delete (ly:gulp-file f) #\cr) #\nl))
+                       (string-split
+                         (if (guile-v2)
+                             (string-delete #\cr (ly:gulp-file f))
+                             (string-delete (ly:gulp-file f) #\cr))
+                         #\nl))
                      files))))
   (if (and (number? (ly:get-option 'job-count))
            (>= (length files) (ly:get-option 'job-count)))