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

From: Stephen Leake <[email-masked]>
Date: Thu, 06 Aug 2015 02:15:42 -0500

Stefan Monnier <[email-masked]> writes:

>> 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.

Ok. Can you post your local hack? That would at least be useful during a
transition to lexical-binding: t; after that, testing should suffice.

-- 
-- Stephe