From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62597 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: use of (defvar ) Date: Fri, 07 Apr 2006 16:48:16 -0700 Organization: Newt Software Message-ID: <87ek09rlq7.fsf@olgas.newt.com> References: <87lkuhdsyb.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144453740 25279 80.91.229.2 (7 Apr 2006 23:49:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Apr 2006 23:49:00 +0000 (UTC) Cc: ding@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 08 01:48:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FS0hE-0004p3-5t for ged-emacs-devel@m.gmane.org; Sat, 08 Apr 2006 01:48:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FS0hD-0005WT-JY for ged-emacs-devel@m.gmane.org; Fri, 07 Apr 2006 19:48:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FS0h3-0005WM-4f for emacs-devel@gnu.org; Fri, 07 Apr 2006 19:48:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FS0h1-0005WA-P2 for emacs-devel@gnu.org; Fri, 07 Apr 2006 19:48:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FS0h1-0005W7-Ix for emacs-devel@gnu.org; Fri, 07 Apr 2006 19:48:43 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FS0l5-0002AU-GJ for emacs-devel@gnu.org; Fri, 07 Apr 2006 19:52:55 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FS0gs-0004n4-Cm for emacs-devel@gnu.org; Sat, 08 Apr 2006 01:48:34 +0200 Original-Received: from h-68-165-6-164.snvacaid.dynamic.covad.net ([68.165.6.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Apr 2006 01:48:34 +0200 Original-Received: from wohler by h-68-165-6-164.snvacaid.dynamic.covad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Apr 2006 01:48:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h-68-165-6-164.snvacaid.dynamic.covad.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:wi+2V5zsM56wCCrPNny1VrzdWSg= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52522 gmane.emacs.gnus.general:62597 Archived-At: Stefan Monnier writes: >> Could people on emacs-devel please comment on this? >> Should we use (defvar ) or (eval-when-compile (defvar )) 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 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.