Gnus development mailing list
 help / color / mirror / Atom feed
From: Bill Wohler <wohler@newt.com>
Cc: ding@gnus.org
Subject: Re: use of (defvar <foo>)
Date: Fri, 07 Apr 2006 16:48:16 -0700	[thread overview]
Message-ID: <87ek09rlq7.fsf@olgas.newt.com> (raw)
In-Reply-To: <87lkuhdsyb.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Could people on emacs-devel please comment on this?
>> Should we use (defvar <foo>) or (eval-when-compile (defvar <foo>)) in Gnus
>> for compatibility with Emacs 21?  (Probably the same holds for MH-E.)
>
>>From the future's point of view (Emacs-22 and up), placing such defvars
> inside eval-when-compile is a bad practice (in the future it may even fail
> to work since there's nothing that guarantees that the content of
> eval-when-compile is actually compiled rather than just eval'd).
>
> In Emacs-21 and older, such a defvar will have some undesirable minor
> side-effects (via the load-history) unless it is placed inside an
> eval-when-compile *and* the file is byte-compiled.  Indeed placing the
> defvar inside the eval-when-compile has no effect if the file is not
> byte-compiled.
>
> I'd recommend to not use eval-when-compile since that's what many packages
> have been doing for many years without suffering much (if ever) of the
> occasional side-effects (which only affect unload-feature and sometimes
> C-h v).
>
> But it's your call, really.

I was planning on stripping the eval-when-compile defvar wrappers for
the MH-E 8.0/Emacs 22.1 release. Reiner, is the problem you describe
real or theoretical?

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

  reply	other threads:[~2006-04-07 23:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06 19:24 Dave Love
2006-04-06 19:58 ` Reiner Steib
2006-04-07 11:46   ` Dave Love
2006-04-07 19:07     ` Reiner Steib
2006-04-07 20:45       ` Stefan Monnier
2006-04-07 23:48         ` Bill Wohler [this message]
2006-04-09 13:56         ` Dave Love
2006-04-09 14:02           ` David Kastrup
2006-04-11 16:45             ` Dave Love
2006-04-10  0:29           ` Stefan Monnier
2006-04-11 17:06             ` Dave Love
2006-04-11 17:31               ` David Kastrup
2006-04-13 16:44                 ` Dave Love
2006-04-11 18:42               ` Stefan Monnier
2006-04-13 16:51                 ` Dave Love
2006-04-08 16:17       ` Richard Stallman
2006-04-09 14:03         ` Dave Love
2006-04-11  6:28     ` Lars Magne 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=87ek09rlq7.fsf@olgas.newt.com \
    --to=wohler@newt.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).