From: David Kastrup Date: Sun, 20 Oct 2013 15:23:46 +0000 (+0200) Subject: Issue 3624: make-connected-path-stencil broke on closed paths X-Git-Tag: release/2.17.95-1~4^2~28 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=c637ff1a496a4aeffd820e189295cb4c9b23aa65 Issue 3624: make-connected-path-stencil broke on closed paths Cf. . Actually, the whole function is an obfuscated Scheme programming contest. I made a few of the more flamboyant list manipulations boring while at it. --- diff --git a/scm/stencil.scm b/scm/stencil.scm index 0ce428a6e5..a457087b15 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -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)