From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: e and pi Date: Thu, 16 Sep 2010 16:27:30 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284647280 29672 80.91.229.12 (16 Sep 2010 14:28:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Sep 2010 14:28:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 16 16:27:55 2010 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.69) (envelope-from ) id 1OwFRK-0001jk-VV for ged-emacs-devel@m.gmane.org; Thu, 16 Sep 2010 16:27:55 +0200 Original-Received: from localhost ([127.0.0.1]:57922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwFRK-0005Tr-3n for ged-emacs-devel@m.gmane.org; Thu, 16 Sep 2010 10:27:54 -0400 Original-Received: from [140.186.70.92] (port=53322 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwFR9-0005Qr-4K for emacs-devel@gnu.org; Thu, 16 Sep 2010 10:27:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwFR8-0002pl-7r for emacs-devel@gnu.org; Thu, 16 Sep 2010 10:27:43 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:53903) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwFR8-0002ph-1n for emacs-devel@gnu.org; Thu, 16 Sep 2010 10:27:42 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OwFR5-0001Za-RU for emacs-devel@gnu.org; Thu, 16 Sep 2010 16:27:39 +0200 Original-Received: from dial-181118.pool.broadband44.net ([212.46.181.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Sep 2010 16:27:39 +0200 Original-Received: from eller.helmut by dial-181118.pool.broadband44.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Sep 2010 16:27:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dial-181118.pool.broadband44.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:xI7GRJabPJLicKRxjH4EA4FCatc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:130255 Archived-At: * Stefan Monnier [2010-09-16 13:25] writes: > In their case, the solution is to rename them to `float-e' and > `float-pi', but this introduces a backward incompatibility. > I figure we could define-obsolete-variable-alias (which leaves the > problem of `e' and `pi' being dynamically scoped, but hopefully only > for a few versions until we remove the obsolete name), but this means > that every code that does (let ((e )) ...) would now get a stupid > warning about using an obsolete variable `e'. > > So I intend to do the following: > - in Emacs-23.3, define `e', `float-e', `pi', and `float-pi' and declare > `e' and `pi' obsolete, but without a make-obsolete-variable > (i.e. only in NEWS and in docstrings). > - in Emacs-24 keep float-e and float-pi but get rid of `e' and `pi'. > > Can anyone think of a better solution? Lexically scoped constants. I mean (defconstant e ...) could declare that e is lexically scoped (but has a global binding). So (let ((e )) e) would be legal, but it binds a lexical local variable and not the dynamic variable. Functions called in the dynamic scope would not "see" the lexical binding and would use the global A possible problem are macros that assume that e is a true constant and never rebound. That seems rare for e but would be a real problem for t. Helmut