From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r113896: Declare external variables.
Date: Fri, 16 Aug 2013 12:28:48 -0400 [thread overview]
Message-ID: <jwv61v5iov9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <871u5uozq5.fsf@gmx.de> (Michael Albinus's message of "Fri, 16 Aug 2013 09:34:58 +0200")
>>> +(eval-when-compile
>>> + (defvar directory-sep-char)
>>> + (defvar dired-move-to-filename-regexp))
>> You don't want to "eval" those defvars, since evaluating such a defvar is
>> mostly a no-op. So don't put them inside eval-when-compile.
> But it doesn't hurt, does it?
Yes it does. It actually hides those defvars from the compiler since it
passes the code to `eval' and only passes the result (aka nil) to the
compiler (at least, that's what "eval-when-compile" is supposed to
mean).
It's a bad habit. The byte-compiler has to do extra work to find those
defvars because of people who write code like that.
Please fix it, so as not to set a bad example,
Stefan
next prev parent reply other threads:[~2013-08-16 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VA0wJ-0001uE-N7@vcs.savannah.gnu.org>
2013-08-15 20:25 ` [Emacs-diffs] trunk r113896: Declare external variables Stefan Monnier
2013-08-16 7:34 ` Michael Albinus
2013-08-16 16:28 ` Stefan Monnier [this message]
2013-08-17 10:21 ` Michael Albinus
2013-08-16 22:38 ` Xue Fuqiao
2013-08-15 20:32 ` Stefan Monnier
2013-08-16 12:46 ` Michael Albinus
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=jwv61v5iov9.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
/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).