X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmarkup.scm;h=b3b7b34c30a9b0f33e077cf11cbed2200d181469;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=69a6ad13ffaf886912531f7704772e34a9fc7025;hpb=44dd3acc534e7a534f846810b481c3f603eaa92e;p=lilypond.git diff --git a/scm/markup.scm b/scm/markup.scm index 69a6ad13ff..b3b7b34c30 100644 --- a/scm/markup.scm +++ b/scm/markup.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2003--2012 Han-Wen Nienhuys +;;;; Copyright (C) 2003--2015 Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -48,16 +48,13 @@ Example: (define-public interpret-markup ly:text-interface::interpret-markup) (define-public (interpret-markup-list layout props markup-list) - ;; This relies on the markup list returned by a markup list command - ;; to be modifiable - (reverse! - (fold - (lambda (m prev) - (if (markup-command-list? m) - (reverse! (apply (car m) layout props (cdr m)) prev) - (cons (interpret-markup layout props m) prev))) - '() - markup-list))) + (fold-right + (lambda (m prev) + (if (markup-command-list? m) + (append (apply (car m) layout props (cdr m)) prev) + (cons (interpret-markup layout props m) prev))) + '() + markup-list)) (define-public (prepend-alist-chain key val chain) (cons (acons key val (car chain)) (cdr chain)))