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: Real constants Date: Wed, 13 Jul 2005 20:29:52 +0200 Message-ID: References: <87u0iymvce.fsf-monnier+emacs@gnu.org> Reply-To: Juanma Barranquero 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 1121280192 24199 80.91.229.2 (13 Jul 2005 18:43:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2005 18:43:12 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 20:43:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsmBx-0006Rd-NB for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2005 20:42:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsmDe-00025L-3k for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2005 14:44:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DsmCu-0001vl-DU for emacs-devel@gnu.org; Wed, 13 Jul 2005 14:43:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DsmBR-0001HN-FV for emacs-devel@gnu.org; Wed, 13 Jul 2005 14:42:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsmBQ-00018x-DO for emacs-devel@gnu.org; Wed, 13 Jul 2005 14:42:12 -0400 Original-Received: from [64.233.182.193] (helo=nproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dsm7N-0002Gl-Hz for emacs-devel@gnu.org; Wed, 13 Jul 2005 14:38:01 -0400 Original-Received: by nproxy.gmail.com with SMTP id h2so65772nfe for ; Wed, 13 Jul 2005 11:29: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=opXHkrZlXMlA1/x11n4aH5kdV+wzR8IpCYJdEXuEvvvstlFPdU/DD5fcLdB3NGzbNzIdXSInO7Sc+/6BF8hVipnfLPfY8PIh48e8VuRJMWpRrWlmWOfIpQgwz87q+dVUaw23kyi/XwpJ7ZpgRadx076epuxWqh/lZ9yY2Ma4gvs= Original-Received: by 10.48.250.9 with SMTP id x9mr45885nfh; Wed, 13 Jul 2005 11:29:52 -0700 (PDT) Original-Received: by 10.48.250.5 with HTTP; Wed, 13 Jul 2005 11:29:52 -0700 (PDT) Original-To: Stefan Monnier In-Reply-To: <87u0iymvce.fsf-monnier+emacs@gnu.org> 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:40870 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40870 On 7/13/05, Stefan Monnier wrote: > I believe it's mostly because it wasn't nearly as trivial/cheap until Ger= d > installed his defvaralias patch, which also introduced the `constant' fie= ld > in symbols. Yeah, I meant "trivial now", of course. But that's been in Emacs for what? Five years? > Among the local patches I use, I've expanded this `constant' field to > 2 bits, so it can be either hard-read-only or soft-read-only (or writable= , > of course). The soft-read-only state is used by defconst so that variabl= es > defined by defconst cannot be setq but can be changed via defconst > (important when you reload a new version of a package where a defconst wa= s > changed). Do you allow un-const'ing things? If so, special care should be taken with `enable-multibyte-characters', nil, t and perhaps a few others... > Making defconst variables into constants introduces a few occasional > problems with some packages, of course, but nothing too hard to fix. And in fact I'd bet most of these problems are, if not bugs, at least bad style... :) Could you please post your code here? I think it would be a great feature (after 22.1). --=20 /L/e/k/t/u