[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is FUNC in cl-callf not allowed to be an expression?
From: |
Stefan Monnier |
Subject: |
Re: Why is FUNC in cl-callf not allowed to be an expression? |
Date: |
Wed, 22 May 2019 23:38:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> @@ -1360,6 +1360,8 @@ Macro Bindings
> affect only calls that appear physically within the body
> @var{forms}, possibly after expansion of other macros in the
> body.
> +
> +Like global macros local macros are expanded at compile-time.
> @end defmac
Of course, if you don't compile the code, there's no "compile-time", so
this description becomes a bit weird.
Macros can be expanded at any time before executing the code, so indeed
they can't reliably make use of variables bound in the code surrounding
the macro call. Whether they're local or global macros makes no
difference in this respect.
In practice, you basically can't compile code without first expanding
the macros it invokes, so when the code is compiled, the macros are
usually expanded at that time.
Stefan
- Re: Why is FUNC in cl-callf not allowed to be an expression?, (continued)
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Noam Postavsky, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Andy Moreton, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/23
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/22
- Re: Why is FUNC in cl-callf not allowed to be an expression?,
Stefan Monnier <=
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/23
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/24
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/28
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/26
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/29
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/15