[Top][All Lists]

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

Re: bug in syncase

From: Carl R. Witty
Subject: Re: bug in syncase
Date: 04 Dec 2002 10:27:52 -0800

Neil Jerram <address@hidden> writes:

> I would say that there are no statements except that transformed Elisp
> code should behave in the same way as Emacs.
> So Guile as it stands is already wrong in the last result.  It looks
> as though Emacs behaves as though there is no memoization at all.
> It strikes me that macros have two meanings that are confused.
> 1 is to prevent automatic evaluation of arguments.
> 2 is to gain execution efficiency by expanding/transforming code at
> read time.

Emacs does not do memoization during eval; macros are re-evaluated
every time they are encountered.  However, if you byte-compile a
function (typically by byte-compiling an entire file at install time,
although it's also possible to byte-compile an individual function at
run time), macros are expanded during the byte-compilation process.

This means that Emacs Lisp code which is to run correctly both
interpreted and compiled must be insensitive to when or how often
macro expansion is done; such code -- which includes virtually all
distributed Emacs Lisp code, I would think -- would also work if macro
expansion were memoized.  The interactive development process would be
different, though; for a complete clone of Emacs, including the
development process, you would want to have an eval that does no
memoization and some sort of separate compilation phase.

The above is how GNU Emacs 19.x worked, but I would be surprised if
any of the branches or later versions were different.

Carl Witty

reply via email to

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