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

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

RE: How to avoid warning, with undefined functions in a package


From: Drew Adams
Subject: RE: How to avoid warning, with undefined functions in a package
Date: Mon, 19 Oct 2020 08:16:38 -0700 (PDT)

> Those are undefined functions and variables, but I would not like
> defining them, or requiring them, unless user has that other package.
> 
> What would be good approach to solve that, and that there are no
> compiler warnings?
> 
> In rcd-speak-festival:
> rcd-utilities.el:121:23: Warning: reference to free variable
>     ‘festival-program-name’

For the undefined variable warnings: If you are convinced that your code does 
the right thing, so those warnings are spurious, add an empty `defvar' for each 
such variable warning.  E.g., for variable foo, add this:

;; No initial value.  Just tells the byte compiler
;; that this is a special variable.
;;
(defvar foo)



reply via email to

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