[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I remove "reference to free variable" warnings onbuffer-local
Re: How do I remove "reference to free variable" warnings onbuffer-local variables?
Mon, 09 Nov 2009 19:58:52 +0100
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
"Drew Adams" <address@hidden> writes:
> Again, I'm no expert on this. Others will no doubt correct me. But I'm
> pretty sure that the example you gave is not useful: the `boundp' test
> is not needed, and it doesn't do anything, since the "use" of the
> variable for which the warning would be suppressed here is simply
> `(defvar some-variable)', which doesn't issue a warning anyway.
Yes, you are right. And even if it was bound an additional defvar (even
with an init value) would do no harm. So simply put a
to suppress the compiler warnings after double-checking that the
warnings are only caused by the fact that the variable is undefined only
at compile time and not at runtime.