unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 21185@debbugs.gnu.org
Subject: bug#21185: 25.0.50; byte-compiler warn on quote lexical var
Date: Thu, 06 Aug 2015 02:15:42 -0500	[thread overview]
Message-ID: <86si7wc2g1.fsf@stephe-leake.org> (raw)
In-Reply-To: <jwvk2t9umjs.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Wed, 05 Aug 2015 23:28:52 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2015-08-06  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04  9:17 bug#21185: 25.0.50; byte-compiler warn on quote lexical var stephen_leake
2015-08-06  3:28 ` Stefan Monnier
2015-08-06  7:15   ` Stephen Leake [this message]
2021-07-08 14:12   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86si7wc2g1.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=21185@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).