defvar
definitions for these variables, like this:
(defvar foo)
Such a definition has no effect except to tell the compiler
not to warn about uses of the variable foo
in this file.
declare-function
statement (see Telling the Compiler that a Function is Defined).
require
(see require) for
that package to avoid compilation warnings for them, like this:
(require 'foo)
If you need only macros from some file, you can require it only at compile time (see Evaluation During Compilation). For instance,
(eval-when-compile (require 'foo))
with-no-warnings
. See Compiler Errors.