From: Stefan Monnier <monnier@iro.umontreal.ca>
To: stephen_leake@stephe-leake.org
Cc: 21185@debbugs.gnu.org
Subject: bug#21185: 25.0.50; byte-compiler warn on quote lexical var
Date: Wed, 05 Aug 2015 23:28:52 -0400 [thread overview]
Message-ID: <jwvk2t9umjs.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <86y4hre7ku.fsf@stephe-leake.org> (stephen leake's message of "Tue, 04 Aug 2015 04:17:21 -0500")
> 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
next prev parent reply other threads:[~2015-08-06 3:28 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 [this message]
2015-08-06 7:15 ` Stephen Leake
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk2t9umjs.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=21185@debbugs.gnu.org \
--cc=stephen_leake@stephe-leake.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.