David Nalesnik <david.nales...@gmail.com> writes:

> It turns out that the my definition of event-drul as '(() . ()) was
> the problem.  I substituted (cons '() '()) and everything works just
> fine...even with the file that gave you the issues with multiple
> staves.  I don't understand why '(() . ()) and (cons '() '()) aren't
> equivalent.

The problem is rather that '(() . ()) is equivalent, like eq?, with
itself.  It is a constant, meaning that on a second run, the _same_ cons
cell is being used as in the first run, even if you changed its car and
cdr in the mean time.

(cons '() '()) allocates a new cons cell for every run.  '() itself is
not a pair and so it is immutable and not susceptible to this problem.

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to