lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recompilation failure, strange


From: David Kastrup
Subject: Re: recompilation failure, strange
Date: Tue, 06 Dec 2011 11:19:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

David Kastrup <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> David Kastrup <address@hidden> writes:
>>
>>> And then there is one thing that is quite non-obvious and needs fixing:
>>> a comment.
>>>
>>>     % direction (either #UP or #DOWN)
>>>
>>> # and $ in comments inside of #{ ... #} are not completely
>>> unproblematic.  $ was much more dangerous, now both $ and # are a bit
>>> more low-profile.
>>
>> [...]
>>
>>> With current 2.15, it will start working again if you put a space after
>>> #DOWN.
>>
>> Actually, the comment alone does not faze #(define-... #{ #}) so there
>> is something quite more fishy going on.  It still works when adding that
>> above-mentioned space, however.
>>
>> I'll have to see what else is up here.
>
> Crapola.  The Scheme reader _does_ read the trailing ), but does not
> complain.  Instead it pushes it back to the port where it is digested
> when the _next_ # is coming up.
>
> So yes, I guess it should be possible to fix 2.15.x so that not even the
> above comment will give it a hickup.  I'll take a look.

Currently doing the regtests, but the following trivial patch should be
able to defuse this comment if you can't wait until it has made it
through the channels.  The other problem in mydefs.ly is you
accidentally hitting <return> in the middle of a word.

>From 208f17c5f239887caf59d6fc3f054791c2171d18 Mon Sep 17 00:00:00 2001
From: David Kastrup <address@hidden>
Date: Tue, 6 Dec 2011 11:13:55 +0100
Subject: [PATCH] Fix an obscure  problem with #{ ... #xxx) #} where ) gets
 read twice

---
 scm/parser-ly-from-scheme.scm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scm/parser-ly-from-scheme.scm b/scm/parser-ly-from-scheme.scm
index 7e17571..a2bc74c 100644
--- a/scm/parser-ly-from-scheme.scm
+++ b/scm/parser-ly-from-scheme.scm
@@ -43,6 +43,9 @@ from @var{port} and return the corresponding Scheme music 
expression.
                             (if (or (char=? c #\#) (char=? c #\$))
                                 (let* ((p (ftell out))
                                        (expr (read copycat)))
+                                  ;; kill unused lookahead, it has been
+                                  ;; written out already
+                                  (drain-input copycat)
                                   ;; only put symbols and non-quote
                                   ;; lists into closures -- constants
                                   ;; don't need lexical environments
-- 
1.7.5.4


-- 
David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]