From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: eval-when-compile vs defconst Date: Mon, 13 Nov 2006 10:41:25 -0800 (PST) Message-ID: <58171.128.165.123.18.1163443285.squirrel@webmail.lanl.gov> References: Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1163443418 10947 80.91.229.2 (13 Nov 2006 18:43:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2006 18:43:38 +0000 (UTC) Cc: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 19:43:35 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 1Gjgkk-00025O-3e for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2006 19:41:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gjgkj-0002Wr-7x for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2006 13:41:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjgkX-0002Wm-4x for emacs-devel@gnu.org; Mon, 13 Nov 2006 13:41:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjgkU-0002WW-4i for emacs-devel@gnu.org; Mon, 13 Nov 2006 13:41:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjgkU-0002WT-1R for emacs-devel@gnu.org; Mon, 13 Nov 2006 13:41:38 -0500 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GjgkO-0006FS-3f; Mon, 13 Nov 2006 13:41:32 -0500 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id kADIfR8h015415; Mon, 13 Nov 2006 11:41:27 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id kADIfQ9q016072; Mon, 13 Nov 2006 11:41:26 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id kADIfQbk023577; Mon, 13 Nov 2006 11:41:26 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id kADIfP5b023575; Mon, 13 Nov 2006 10:41:25 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Mon, 13 Nov 2006 10:41:25 -0800 (PST) In-Reply-To: Original-To: "Richard Stallman" User-Agent: SquirrelMail/1.4.6-7.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 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:62231 Archived-At: > (defvar ada-block-start-re > (eval-when-compile > (concat "\\<\\(" (regexp-opt '("begin" "declare" "else" > "exception" "generic" "loop" "or" > "private" "select" )) > "\\|\\(\\(limited\\|abstract\\|tagged\\)[ \t\n]+\\)*record\\)\\>")) > "Regexp for keywords starting Ada blocks.") > > It would not be worth any extra complexity just to avoid one call to > concat when the file is loaded. So even if eval-when-compile were not > a no-op here, I'd say take it out. Surely it's there to avoid calling (and loading) `regexp-opt' at load time, and the concat is merely along for the ride? Unless the optimizer already evaluates calls to `regexp-opt' on quoted lists, it seems useful to me. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.