GNU bug report logs - #52147
Eager macro-expansion is not performed in `eval-and-compile' functions

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Sat, 27 Nov 2021 19:38:01 UTC

Severity: wishlist

Full log


Message #8 received at 52147 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 52147 <at> debbugs.gnu.org
Subject: Re: bug#52147: Eager macro-expansion is not performed in
 `eval-and-compile' functions
Date: Sun, 28 Nov 2021 11:30:20 +0100
Hello Paul,

> (eval-and-compile
>   (defun my-func-eac (what)
>     (my-macro what)))
>
> (defun my-func-normal (what)
>   (my-macro what))
>
> (print (symbol-function 'my-func-eac))
> (print (symbol-function 'my-func-normal))
>
> `eval-and-compile' is advertised in Elisp manual to make
> byte-compilation of certain macros without prior loading
> possible. Looks strange that at the same time it can worsen
> performance of non-byte-compiled code.

Is the issue you want to draw attention to that an interpreted
`eval-and-compile' form doesn't macroexpand its body?

Michael.




This bug report was last modified 3 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.