]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3624: make-connected-path-stencil broke on closed paths
authorDavid Kastrup <dak@gnu.org>
Sun, 20 Oct 2013 15:23:46 +0000 (17:23 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 25 Oct 2013 06:04:10 +0000 (08:04 +0200)
Cf. <URL:http://lists.gnu.org/archive/html/bug-lilypond/2013-10/msg00083.html>.
Actually, the whole function is an obfuscated Scheme programming
contest.  I made a few of the more flamboyant list manipulations
boring while at it.

scm/stencil.scm

index 0ce428a6e56568be4f7058037df8f9b900293d51..a457087b15913aaced436bf96942c702853e7bd3 100644 (file)
@@ -464,12 +464,12 @@ respectively."
                        x))
                     pointlist))
          ;; a path must begin with a `moveto'
-         (prepend-origin (apply list (cons 'moveto origin) path))
+         (prepend-origin (cons (cons 'moveto origin) path))
          ;; if this path is connected, add closepath to the end
          (final-path (if connect
-                         (append prepend-origin (list 'closepath))
+                         (append prepend-origin (list '(closepath)))
                          prepend-origin))
-         (command-list (fold-right append '() final-path)))
+         (command-list (concatenate final-path)))
     (ly:make-stencil
      `(path ,thickness
             `(,@',command-list)