all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 52147@debbugs.gnu.org
Subject: bug#52147: Eager macro-expansion is not performed in `eval-and-compile' functions
Date: Sun, 28 Nov 2021 22:53:52 +0100	[thread overview]
Message-ID: <CAG7Bpao6RvRpY07KW8wg49Ha0Z_GvVtaF=r_XY_ptq7SL0wdqw@mail.gmail.com> (raw)
In-Reply-To: <87czmk7etf.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

That's what the subject says. I know that it works regardless, but the
performance suffers, especially if the used macros are complex.

Paul

On Sun, 28 Nov 2021 at 11:30, Michael Heerdegen <michael_heerdegen@web.de>
wrote:

> 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.
>

[-- Attachment #2: Type: text/html, Size: 1306 bytes --]

  reply	other threads:[~2021-11-28 21:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 19:37 bug#52147: Eager macro-expansion is not performed in `eval-and-compile' functions Paul Pogonyshev
2021-11-28 10:30 ` Michael Heerdegen
2021-11-28 21:53   ` Paul Pogonyshev [this message]
2021-11-29 15:44     ` Lars Ingebrigtsen
2021-11-29 19:14       ` Michael Heerdegen
2022-01-15 13:10         ` Lars Ingebrigtsen
2022-01-15 15:09           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-20  9:50             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG7Bpao6RvRpY07KW8wg49Ha0Z_GvVtaF=r_XY_ptq7SL0wdqw@mail.gmail.com' \
    --to=pogonyshev@gmail.com \
    --cc=52147@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.