From: David Kastrup Date: Mon, 9 Nov 2015 00:03:32 +0000 (+0100) Subject: Issue 4656: Let concat-markup fold \char calls into surrounding strings X-Git-Tag: release/2.19.32-1~13^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=29756a08ce73be564baed5ab1e4bea4e3e5d9919;p=lilypond.git Issue 4656: Let concat-markup fold \char calls into surrounding strings This results in \markup \column \box { AVA \concat { A V A } \concat { A \char #(char->integer #\V) A } } using the same kerning in all three lines while previously the third line differed. --- diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 0ca1042e8d..6aae0be780 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -1405,11 +1405,13 @@ equivalent to @code{\"fi\"}. @end lilypond" (define (concat-string-args arg-list) (fold-right (lambda (arg result-list) - (let ((result (if (pair? result-list) - (car result-list) - '()))) - (if (and (pair? arg) (eqv? (car arg) simple-markup)) - (set! arg (cadr arg))) + (let ((result (and (pair? result-list) + (car result-list)))) + (cond ((not (pair? arg))) + ((eq? (car arg) simple-markup) + (set! arg (cadr arg))) + ((eq? (car arg) char-markup) + (set! arg (ly:wide-char->utf-8 (cadr arg))))) (if (and (string? result) (string? arg)) (cons (string-append arg result) (cdr result-list)) (cons arg result-list))))