Subject: bug#6376: 23.2; byte compile add-to-list report free variable

From: Kevin Ryde <[email-masked]>
Date: Sat, 07 Aug 2010 09:45:43 +1000

I got a bit further to these few lines.  Not quite ready yet, but
getting closer.  The byte-compile-check-var is more or less a break-out
of the checks in byte-compile-variable-ref.

add-hook and remove-hook end up with checks against non-variables, but
they don't demand a bound variable.  I suppose they could helpfully also
notice undefined functions in their second arg too.  You'd be tempted to
have some sort of general arg-type description for the builtin funcs
rather than doing checks plus "normal-call" for each.