help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling a recursive macro


From: Stefan Monnier
Subject: Re: Compiling a recursive macro
Date: Thu, 11 Jun 2020 16:57:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> That suggests to me that you can't compile any recursive macro.

Depends what you mean by "recursive macro".
What this prevents is to use a macro inside the definition of a macro.

Most cases of "recursive macros" instead just returns code which
itself uses that macro.  In that case, there's no real recursion: the
macro just returns a list which happens to include a symbol which has
the same name as the macro.  And then the macro-expander will end up
calling that macro back when it gets to macro-expanding that chunk
of code.
This works just fine (and may inf-loop, of course).


        Stefan





reply via email to

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