[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unbound variable GUILE error when no whitespace before closing brace
From: |
David Kastrup |
Subject: |
Re: Unbound variable GUILE error when no whitespace before closing brace |
Date: |
Sun, 05 Feb 2012 08:30:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
James <address@hidden> writes:
> Hello,
>
> Just investigating some old Tracker issues I came across that
>
> \new Staff \with { \override StaffSymbol #'staff-space = #0.9 }
> \relative {
> \times 2/3 { d16[ d16 d16] }
> }
>
> compiles
>
> but
>
> \new Staff \with { \override StaffSymbol #'staff-space = #0.9}
> \relative {
> \times 2/3 { d16[ d16 d16] }
> }
>
> Doesn't.
Sure.
> --snip--
> GNU LilyPond 2.14.1
> Processing `test.ly'
> Parsing...
> test.ly:14:58: error: GUILE signaled an error for the expression beginning
> here
> \new Staff \with { \override StaffSymbol #'staff-space = #
> 0.9}
> Unbound variable: 0.9}
> test.ly:15:1: error: syntax error, unexpected \relative
>
> etc.
>
> --snip-
>
>
> Note the lack of white space after the '#0.9'
Sure.
> This occurs on 2.14.1 and 2.15.28.
>
> I guess I've been strict with my spacing or never had braces that
> close to an override to notice this before.
>
> I assume this is expected if not nice behaviour. I'm curious only
> because I am wondering how a '}' would be a variable and why it isn't
> ignored or just signalled (if that is the right term) as a close of
> the previous open brace?
The variable is not } but 0.9} instead. Anything that can't be parsed
as a constant in Scheme is a variable.
This has nothing to do with Lilypond:
address@hidden:/usr/local/tmp/lilypond$ guile
guile> 0.9}
ERROR: Unbound variable: 0.9}
ABORT: (unbound-variable)
guile> address@hidden:/usr/local/tmp/lilypond$
You could likely say
#(define 0.9} 0.9)
and have the above work except for the missing closing brace. There is
absolutely nothing that LilyPond could, or even _should_ be trying to
fix here. Scheme is Scheme and outside of LilyPond's responsibility
regarding syntax and semantics.
--
David Kastrup