From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: eval-when-compile vs defconst Date: Sat, 11 Nov 2006 09:39:32 -0500 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163256006 26180 80.91.229.2 (11 Nov 2006 14:40:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Nov 2006 14:40:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 11 15:40:02 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 1Giu1Z-0008DG-DA for ged-emacs-devel@m.gmane.org; Sat, 11 Nov 2006 15:40:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Giu1Y-0000Jo-UI for ged-emacs-devel@m.gmane.org; Sat, 11 Nov 2006 09:40:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Giu1M-0000H8-2N for emacs-devel@gnu.org; Sat, 11 Nov 2006 09:39:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Giu1J-0000Bn-Dt for emacs-devel@gnu.org; Sat, 11 Nov 2006 09:39:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Giu1J-0000BZ-9T for emacs-devel@gnu.org; Sat, 11 Nov 2006 09:39:45 -0500 Original-Received: from [207.172.157.102] (helo=smtp02.lnh.mail.rcn.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Giu1J-0005R6-B1 for emacs-devel@gnu.org; Sat, 11 Nov 2006 09:39:45 -0500 Original-Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 11 Nov 2006 09:39:43 -0500 Original-Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.7.5a-GA) with ESMTP id MMW99355; Sat, 11 Nov 2006 09:39:40 -0500 (EST) Original-Received: from 208-59-165-113.c3-0.slvr-ubr1.lnh-slvr.md.cable.rcn.com (HELO ACS1100007992) ([208.59.165.113]) by smtp01.lnh.mail.rcn.net with ESMTP; 11 Nov 2006 09:39:40 -0500 X-IronPort-AV: i="4.09,413,1157342400"; d="scan'208"; a="310151576:sNHT32112808" Original-To: emacs-devel User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) X-Junkmail-Status: score=10/50, host=mr02.lnh.mail.rcn.net X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A09020A.4555E01F.0088,ss=1,fgs=0, ip=207.172.4.11, so=2006-05-09 23:27:51, dmn=5.2.121/2006-09-27 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:62072 Archived-At: I ran across this construct in ada-mode.el: (eval-when-compile (defconst ada-95-string-keywords '("abstract" "aliased" "protected" "requeue" "tagged" "until") "List of keywords new in Ada 95. Used to define `ada-*-keywords'.")) Is there any point to the 'eval-when-compile'? Help for eval-when-compile says; Like `progn', but evaluates the body at compile time if you're compiling. Thus, the result of the body appears to the compiler as a quoted constant. In interpreted code, this is entirely equivalent to `progn'. Since the body is already a quoted constant, this seems redundant. I suspect the eval-when-compile is left over from a previous version when functions where used to build the string. But I'm not familiar with all of the nuances of byte-compiling, so I thought I'd ask. -- -- Stephe