GNU bug report logs - #46958
28.0.50; invalid-function error for macros that have function bindings

Previous Next

Package: emacs;

Reported by: Robert Irelan <rirelan <at> gmail.com>

Date: Sat, 6 Mar 2021 03:54:02 UTC

Severity: minor

Tags: wontfix

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Robert Irelan <rirelan <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 Lars Ingebrigtsen <larsi <at> gnus.org>, 46958 <at> debbugs.gnu.org
Subject: Re: bug#46958: 28.0.50; invalid-function error for macros that have
 function bindings
Date: Mon, 8 Mar 2021 22:06:31 +1300
On 8/03/21 8:18 pm, Robert Irelan wrote:
> I extracted the macros into a separate library `org-fc-macs` and then
> called `(require 'org-fc-macs)` from the file where the error is
> occurring `org-fc-type-normal.el`. This seems to have fixed the issue.

Good to hear.

I'll just add that my suggestion wasn't quite optimal -- as this is
a macros-only library, a better way to require it is:

(eval-when-compile (require 'org-fc-macs))

This ensures that macros are loaded for byte-compilation, but means
that subsequently loading the byte-compiled .elc library does *not*
load org-fc-macs (which is not needed in this scenario as, in the
byte-compiled code, the macro calls have already been expanded).


-Phil




This bug report was last modified 2 years and 333 days ago.

Previous Next


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