[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue 1349 in lilypond: Lily.scm loads scm files so that macros are firs
From: |
lilypond |
Subject: |
Issue 1349 in lilypond: Lily.scm loads scm files so that macros are first used before they are defined, this worked in V1.8 but causes an error in V1.9/2.0 |
Date: |
Wed, 20 Oct 2010 22:09:54 +0000 |
Status: Accepted
Owner: address@hidden
CC: pnorcks, n.puttock, Carl.D.Sorensen, hanwenn
Labels: Priority-High Type-Enhancement Maintainability
New issue 1349 by address@hidden: Lily.scm loads scm files so that
macros are first used before they are defined, this worked in V1.8 but
causes an error in V1.9/2.0
http://code.google.com/p/lilypond/issues/detail?id=1349
From Guile NEWS
** Macros need to be defined before their first use.
It used to be that with lazy memoization, this might work:
(define (foo x)
(ref x))
(define-macro (ref x) x)
(foo 1) => 1
But now, the body of `foo' is interpreted to mean a call to the toplevel
`ref' function, instead of a macro expansion. The solution is to define
macros before code that uses them
This shows up in LilyPond initialization as
.
.
[/home/ian/lilypond/out/share/lilypond/current/scm/ly-syntax-constructors.scm]
[/home/ian/lilypond/out/share/lilypond/current/scm/define-context-properties.scm]
[/home/ian/lilypond/out/share/lilypond/current/scm/translation-functions.scm;;;
note:
autocompilation is et GUILE_AUTO_COMPILE=0
;;; or pass the --no-autocompile argument to disable.
;;; compiling /home/ian/lilypond/scm/translation-functions.scm
error: Not a markup command: line
compiling markup expression
(#:line (#:slashed-digit figure))
Patrick has prototyped a solution which reorders the load-order and
restructures the declaration of the markup commands. This tracker is to
merge the code into the master repository.
- Issue 1349 in lilypond: Lily.scm loads scm files so that macros are first used before they are defined, this worked in V1.8 but causes an error in V1.9/2.0,
lilypond <=