[Top][All Lists]

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

Re: problem with macro definitions

From: Michael Heerdegen
Subject: Re: problem with macro definitions
Date: Sat, 29 Apr 2017 11:52:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Michael Heerdegen <> writes:

> Your macro `state-eof' actually does find the value at compile time.
> It's still an unusual use case for `defmacro' which is normally code
> transformation.  Your `state-eof' calls just expand to a number.  You
> can do this, but in real life one would probably prefer a different
> solution, like defining this number as a `defconst', depending on the
> actual use case.

BTW, a good method to do calculations at compile time is to use
`eval-when-compile'.  Depending on the actual use case, it's mostly
still good enough and easier to do such things (once) at load time.


reply via email to

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