From: Nicolas Sceaux Date: Sat, 26 Jun 2004 01:49:04 +0000 (+0000) Subject: * scm/ly-from-scheme.scm (read-lily-expression): #$( ... ) X-Git-Tag: release/2.2.4~4^2~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=762a0021fde85be7360638d4fbfffadad84345bc;p=lilypond.git * scm/ly-from-scheme.scm (read-lily-expression): #$( ... ) was causing an error. (was not actually commited in 2004-06-20) * input/regression/lily-in-scheme.ly (withPaddingC): does not breaks anymore --- diff --git a/ChangeLog b/ChangeLog index 20da753d7a..500803a053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-06-26 Nicolas Sceaux + + * scm/ly-from-scheme.scm (read-lily-expression): #$( ... ) + was causing an error. (was not actually commited in 2004-06-20) + + * input/regression/lily-in-scheme.ly (withPaddingC): does not + breaks anymore + 2004-06-24 Han-Wen Nienhuys * lily/my-lily-parser.cc (parse_string): switch module too. diff --git a/input/regression/lily-in-scheme.ly b/input/regression/lily-in-scheme.ly index 344fc69e79..218f5b0378 100644 --- a/input/regression/lily-in-scheme.ly +++ b/input/regression/lily-in-scheme.ly @@ -8,45 +8,39 @@ In this example, the @code{\withpaddingA}, @code{\withpaddingB} and @code{\withpaddingC} music functions set different kinds of padding on the @code{TextScript} grob. -FIXME: this is broken. " - -} - - -\score{ c'4^"FIXME" } -%{ + + } \version "2.3.4" \paper { raggedright = ##t } withPaddingA = #(def-music-function (location padding music) (number? ly:music?) - #{ \override TextScript #'padding = #$padding - $music - \revert TextScript #'padding #}) - + #{ \override TextScript #'padding = #$padding + $music + \revert TextScript #'padding #}) + withPaddingB = #(def-music-function (location padding music) (number? ly:music?) - #{ \override TextScript #'padding = #$(* padding 2) - $music - \revert TextScript #'padding #}) - + #{ \override TextScript #'padding = #$(* padding 2) + $music + \revert TextScript #'padding #}) + withPaddingC = #(def-music-function (location padding music) (number? ly:music?) - #{ \override TextScript #'padding = #(+ 1 $(* padding 2)) - $music - \revert TextScript #'padding #}) - - \score { - \notes { - c'^"1" - \withPaddingA #2 - { c'^"2" c'^"3"} - c'^"4" - \withPaddingB #2 - { c'^"5" c'^"6"} - c'^"7" - \withPaddingC #2 - { c'^"8" c'^"9"} - c'^"10" - } - } -%} + #{ \override TextScript #'padding = #(+ 1 $(* padding 2)) + $music + \revert TextScript #'padding #}) + +\score { + \notes { + c'^"1" + \withPaddingA #2 + { c'^"2" c'^"3"} + c'^"4" + \withPaddingB #2 + { c'^"5" c'^"6"} + c'^"7" + \withPaddingC #2 + { c'^"8" c'^"9"} + c'^"10" + } +} diff --git a/scm/ly-from-scheme.scm b/scm/ly-from-scheme.scm index 43e6269c6e..0b0d25dd53 100644 --- a/scm/ly-from-scheme.scm +++ b/scm/ly-from-scheme.scm @@ -71,7 +71,10 @@ character." (display (read-char port) out)) ;; pop the second $ ;; a #scheme expression ((char=? c #\#) - (format out "#~a" (remove-dollars! (read port)))) + (let ((expr (read port))) + (format out "#~a" (if (eq? '$ expr) + (create-binding! (read port)) + (remove-dollars! expr))))) ;; other caracters (else (display c out))))))))