Subject: bug#21185: 25.0.50; byte-compiler warn on quote lexical var

From: Stefan Monnier <[email-masked]>
Date: Wed, 05 Aug 2015 23:28:52 -0400

> I've been bitten by this problem when converting code to use lexical
> binding; it would be helpful if the byte-compiler warned about it.

Agreed, but I haven't figured out how to make this work.
There are two problems:
1- detect not just things like « 'var » but also things like « '(var1
   var2 var3) » since such occur in a few places as well.
2- don't swamp the user with false positives.

Problem 2 is by far the biggest.  It's very common to have a local
variable `face' and at the same time to use the symbol `face' (quoted),
for example.

I do have such a warning in my local hacks (it outputs a warning for any
'<var> where <var> is a locally bound lexical variable) and find it
unbearable, even though I'm usually considered to tolerate warnings much
better than most.

        Stefan