bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52147: Eager macro-expansion is not performed in `eval-and-compile'


From: Paul Pogonyshev
Subject: bug#52147: Eager macro-expansion is not performed in `eval-and-compile' functions
Date: Sat, 27 Nov 2021 20:37:01 +0100

Simple code to demonstrate this:

;; -*- lexical-binding: t -*-

(defmacro my-macro (x)
  `,x)

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

Paul

reply via email to

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