[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simplify define-markup-[list-]command-internal, (issue 545590045 by
From: |
dak |
Subject: |
Re: Simplify define-markup-[list-]command-internal, (issue 545590045 by address@hidden) |
Date: |
Sun, 16 Feb 2020 14:12:24 -0800 |
On 2020/02/16 21:23:56, hanwenn wrote:
> On Sun, Feb 16, 2020 at 9:57 PM <mailto:address@hidden> wrote:
>
> > > In this commit, extra support for the case where command-and-args
is
> > empty was added, ie.
> >
> > That characterisation is completely wrong. The support is not for
the
> > cases "where command-and-args is empty" but rather where
> > command-and-args is not a list but a single symbol. Just like
> >
> > (define symbol value)
> > and
> > (define (symbol arg1 arg2) body...)
> >
>
> I'm trying to get the markup macros working with GUILE 2.x
compilation,
> which means that all calls to module-define! have to go.
No, it means that all calls to module-define! from within a macro have
to go. Here the macro is already split into the part not trying to
evaluate symbols and argument lists, and a part (the "internal" one)
that is executed at interpretation time where modules are in working
order. As long as you can specify the _name_ of the internal in a
manner where it is found at interpretation time (since specifying its
_value_ does not work for the byte compiler) you should be fine. An
example of how to do that is in scm/parser-ly-from-scheme.scm currently:
(list (if (guile-v2)
'(@@ (lily) read-lily-expression-internal)
read-lily-expression-internal)
lily-string filename line (cons 'list (reverse! closures)))))
It's not really clear how this will play with -dsafe but let's fix stuff
one point at a time.
https://codereview.appspot.com/545590045/