emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]