Subject: bug#46958: 28.0.50; invalid-function error for macros that have function bindings

From: Phil Sainty <[email-masked]>
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