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

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

Re: Understanding macros and the compilation flow


From: Andreas Politz
Subject: Re: Understanding macros and the compilation flow
Date: Wed, 08 Dec 2010 15:11:46 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

LanX <lanx.perl@googlemail.com> writes:

> Hi
>
>> What you're missing is that the time (and number of times) the macro is
>> expanded depends on various factors.  The Elisp interpreter by default
>> only expands macro during execution (and throws away the result).
>> But don't rely on it, because the byte-compiler does it differently, and
>> the evaluator could also be changed to do it differently.
>
> Sorry thats somehow irritating for me and sorry if it's trivial for
> you.
>
> So there are differences between executing a
> a) compilation,
> b) interpretation and
> c) evaluation?
>
> (I hope at least not between b and c)
>
> And does this mean that an .el file executes differently from the
> corresponding .elc ???
> (of course compiled with the same emacs version)
>
>
> And which case has the "default behaviour" I should rely on?

There are certain pitfalls when writing macros and if you fall in one of
them, compiled code could behave differently compared to evaled
code. You should read about it here
(info "(elisp) Problems with Macros")
.


-ap


reply via email to

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