The use-package
is a useful and popular macro for installing packages, but flycheck always complains about it since it hides variable definitions. For example, if I attempt (use-package org)
, Flycheck will warn of a reference to free variable 'org
.
I also have a defcom
macro that simplifies command definitions for me, but which hides variable definitions in the same way. Flycheck chokes on these too.
How can I advise Flycheck that these instances are okay? Alternatively, how can I selectively disable this warning? Getting Flycheck to ignore unknown macros also seems like a safe bet, since macros redefine syntax and will usually require new rules.
(eval-when-compile (require 'use-package))
? If you use the macro then presumably you want to also require its definition, including at byte-compile time. And if you do usee-w-c
that way, andflycheck
still complains, then the misbehavior you describe sounds like aflycheck
bug/misfeature.use-package
.emacs -Q
. That is, without an init file, load a minimal file explicitly or execute explicit commands.