[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using the content of a dynamic variable in a macro
From: |
Basil Contovounesios |
Subject: |
Re: Using the content of a dynamic variable in a macro |
Date: |
Mon, 27 Feb 2023 19:05:42 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Richard Stallman [2023-02-26 22:24 -0500] wrote:
> > Lexical binding isn't the issue - the variable is global in scope.
> > The issue is that when you explicitly run the byte-compiler in batch mode,
> > the "defvar" expression is only compiled, not evaluated, while the
> defmacro
> > is evaluated, and the application of the macro function is evaluated
> during
> > compilation.
>
> Should we change this to evaluate defvar in batch mode?
The byte-compiler avoids evaluating the defvar also in non-batch mode.
So the question is how much of the code that it is compiling should the
byte-compiler evaluate.
We may need to reuse or possibly extend the notions of Lisp code safety
we have before the byte-compiler can start evaluating arbitrary
expressions. I'm not sure it's worth the complexity.
--
Basil
Re: Using the content of a dynamic variable in a macro, tomas, 2023/02/25
Re: Using the content of a dynamic variable in a macro, Basil Contovounesios, 2023/02/27