Menu

#1349 Guile 2.0 compat: Scheme macros must be defined/autocompiled before they are used.

Verified
nobody
None
Enhancement
2016-03-21
2010-10-20
Anonymous
No

Originally created by: *anonymous

Originally created by: ianhuli...@gmail.com
Originally owned by: ianhuli...@gmail.com

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.

Related

Issues: #1826

Discussion

<< < 1 2 (Page 2 of 2)
  • Google Importer

    Google Importer - 2011-08-29

    Originally posted by: brownian.box@gmail.com

    Thanks for commit id.)

    Status: Verified

     
  • Anonymous

    Anonymous - 2015-09-19
    • Patch: review -->
     
  • Anonymous

    Anonymous - 2015-09-19

    .

     
<< < 1 2 (Page 2 of 2)