From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpw@pobox.com (John Paul Wallington) Newsgroups: gmane.emacs.devel Subject: Re: optimizing defconst Date: Sat, 27 Oct 2007 21:44:07 +0100 Message-ID: <877il8p9t4.fsf@laptop.shootybangbang.com> References: <200710271747.l9RHlQ53020242@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193517875 30829 80.91.229.12 (27 Oct 2007 20:44:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 20:44:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 22:44:36 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IlsWK-0000Gx-6H for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 22:44:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlsWB-0000im-E6 for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 16:44:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlsW7-0000iK-IH for emacs-devel@gnu.org; Sat, 27 Oct 2007 16:44:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlsW6-0000i7-4D for emacs-devel@gnu.org; Sat, 27 Oct 2007 16:44:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlsW6-0000i4-00 for emacs-devel@gnu.org; Sat, 27 Oct 2007 16:44:22 -0400 Original-Received: from sceptre.pobox.com ([207.106.133.20]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlsW5-0001fM-JP for emacs-devel@gnu.org; Sat, 27 Oct 2007 16:44:21 -0400 Original-Received: from sceptre (localhost.localdomain [127.0.0.1]) by sceptre.pobox.com (Postfix) with ESMTP id BB5B72F2; Sat, 27 Oct 2007 16:44:35 -0400 (EDT) Original-Received: from laptop.shootybangbang.com (host86-149-231-159.range86-149.btcentralplus.com [86.149.231.159]) by sceptre.sasl.smtp.pobox.com (Postfix) with ESMTP id EE16B8F4EB; Sat, 27 Oct 2007 16:44:33 -0400 (EDT) X-URL: http://www.shootybangbang.com/ X-Mailer: Norman X-Attribution: JPW X-NSA-Fodder: mailbomb Jyllandsposten Noriega STARLAN IMF BROMURE LLNL X-Face: #uahb@^mo@bA"{q'"a4y[w$n3/V:haD\; YenWcT7)kXYx3/>#[DD9ExVe}; 9FG6X`l!Dm"V peub=u!&&?}s~{TOPtGdH)KA}/qCr; d"Gr*'9_V1PE@+K'tk2/Iq@PBKtJ+]&,CP9_Fl8'*R]LCR0| 6q; Xey'`:DX+)S.]p[KP^sNe`8B\W6(Nw{o5i)y+I!h=0bU5L`Tj`~Q0!G"t(s7o7eh)J\>P>,!~/w $$jGEVa%H%8(jTv In-Reply-To: <200710271747.l9RHlQ53020242@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Sat\, 27 Oct 2007 10\:47\:26 -0700") User-Agent: Microsoft Gnus Express, Build 511.230 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:81881 Archived-At: Dan Nicolaescu writes: > Given this: > > (defconst viper-xemacs-p (featurep 'xemacs)) > > (defun foo() > (if viper-xemacs-p (error "Hmmmm"))) > > > Shouldn't `foo' be optimized to just do nothing? > > It is not: [...] > Am I missing something? I suppose the question is whether there is lots of extant third-party Emacs Lisp code that tries to set or let-bind constant variables and if so whether it is worth breaking that code. FWIW, I found that the version of BBDB that I am using let-binds the constant variable `bbdb-gag-messages'.