From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: defvars at compile time Date: Fri, 16 Sep 2005 15:25:52 +0200 Message-ID: References: <858xxxuupf.fsf@lola.goethe.zz> Reply-To: lekktu@gmail.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1126878278 20580 80.91.229.2 (16 Sep 2005 13:44:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2005 13:44:38 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 16 15:44:37 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EGGVR-0008Aa-1s for ged-emacs-devel@m.gmane.org; Fri, 16 Sep 2005 15:43:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EGGVQ-0008GG-EH for ged-emacs-devel@m.gmane.org; Fri, 16 Sep 2005 09:43:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EGGK1-0004cJ-VQ for emacs-devel@gnu.org; Fri, 16 Sep 2005 09:32:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EGGJz-0004bK-Hl for emacs-devel@gnu.org; Fri, 16 Sep 2005 09:32:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EGGJy-0004UN-Mk for emacs-devel@gnu.org; Fri, 16 Sep 2005 09:32:07 -0400 Original-Received: from [64.233.182.204] (helo=nproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EGGDx-00047P-PN for emacs-devel@gnu.org; Fri, 16 Sep 2005 09:25:53 -0400 Original-Received: by nproxy.gmail.com with SMTP id n15so181631nfc for ; Fri, 16 Sep 2005 06:25:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m0buFLyjY5+S66njzRgCSZ5k2+8bv+25ewaBOf0zLwKsONd+X5EGhvwL/xf3eNvLyXlvE86MyiWZvXc1S7lr+ik/0+M8BAjlznB20Sj/F1N5rnqmsexpYifM7+BZqfxKxlGnwEwAN8tzT2P5ZKPvpjSDhz33gV8lvEoItOxiXqI= Original-Received: by 10.48.1.8 with SMTP id 8mr36816nfa; Fri, 16 Sep 2005 06:25:52 -0700 (PDT) Original-Received: by 10.48.42.13 with HTTP; Fri, 16 Sep 2005 06:25:52 -0700 (PDT) Original-To: David Kastrup In-Reply-To: <858xxxuupf.fsf@lola.goethe.zz> Content-Disposition: inline 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:42992 Archived-At: On 9/16/05, David Kastrup wrote: > Actually, I get "might be undefined at run time" in some similar > eval-when-compile wrapped situations. Maybe with some unusual combination of circumstances. > And having different semantics > during compilation and execution also is not a good idea. There's almost zero semantics in `(eval-when-compile (defvar xxx))'. It doesn't generate code, or assign any value, or affect dynamic bindings (on normal situations, which we're discussing now). It's only a trick to say "shhh" to the byte-compiler. `defvar' is special cased for this. It has no relation with other uses of `eval-when-compile' and friends, which do indeed change the semantics. Whether these cases are a good idea or not, IMO depends on each particular case. `eval-when-compile' exists for a reason. But anyway, I'm not advocating wrapping the defvars in e-w-c; I was just pointing out to Carsten why I didn't wrap them in the first place, and why I found surprising that he did. --=20 /L/e/k/t/u