emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] trunk r117002: Correctly treat progn contents as tople


From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r117002: Correctly treat progn contents as toplevel forms when byte compiling
Date: Mon, 21 Apr 2014 22:09:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> Any macro that expands to something like this:
> (progn (defmacro abc (arg) 1) (defun def () (abc 2)))

That's not the kind of example I was thinking if.  Do you have a real
example, maybe?

> Some of the iface stuff I was working on used this functionality.

> The comments in bytecomp.el suggest that EIEIO has similar stuff.

No, that comment is about eieio.el using eval-and-compile over large
swaths of code, which is very unusual, so I made eval-and-compile behave
more like the usual top-level (before that eval-and-compile expanded
all its macros in a single pass).

> In any case, it's a reasonable thing to want to do, so we should
> support it.

I'm not sure I want to impose myself this level of detail.
Especially since it'll also have to be ported to the eager
macro-expansion code.

And OTOH your macro could expand calls to `abc' "manually" in the code
it returns, and hence avoid this need.


        Stefan



reply via email to

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