From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Eliminating "changed in Emacs outside of Customize" Date: Tue, 1 Feb 2005 16:11:49 -0600 (CST) Message-ID: <200502012211.j11MBnj02899@raven.dms.auburn.edu> References: <87lla8xdps.fsf-monnier+emacs@gnu.org> <008801c508a4$01110ac0$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1107296764 27165 80.91.229.2 (1 Feb 2005 22:26:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2005 22:26:04 +0000 (UTC) Cc: rms@gnu.org, lennart.borgman.073@student.lu.se, emacs-devel@gnu.org, monnier@iro.umontreal.ca, drew.adams@oracle.com, abraham@dina.kvl.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 01 23:26:03 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cw6Sq-0004Jn-4u for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2005 23:25:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cw6fq-00066v-16 for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2005 17:39:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cw6at-0005AV-8z for emacs-devel@gnu.org; Tue, 01 Feb 2005 17:34:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cw6aa-00054X-Pl for emacs-devel@gnu.org; Tue, 01 Feb 2005 17:33:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cw6aa-00051O-4A for emacs-devel@gnu.org; Tue, 01 Feb 2005 17:33:40 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cw6Gx-0005uL-0x; Tue, 01 Feb 2005 17:13:23 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j11MD19N006791; Tue, 1 Feb 2005 16:13:01 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j11MBnj02899; Tue, 1 Feb 2005 16:11:49 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: dak@gnu.org In-reply-to: (message from David Kastrup on Tue, 01 Feb 2005 22:35:37 +0100) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32729 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32729 David Kastrup wrote: It appears that I am babbling and confusing this with something else. Probably with custom-declare-variable calling the setter function if the value of the variable has been set before custom-declare-variable is executed. I believe that you were confusing with the defcustom form, which does not override an already set value (_unless_ the :set function does so) and its default :initialize function `custom-initialize-reset', which nevertheless executes the :set function _even_ if the value is already set. `custom-initialize-reset' is a dangerous default by the way, as it could override the user and unpredictably change behavior due to, say, browsing custom groups and hence inadvertently loading a file and executing a defcustom. Indeed, even if the :set function does not change the value, it can change other stuff. We decided before that it was too late to change this default, but I believe that anybody who writes a defcustom with a :set function should carefully check whether the default :initialize function is really appropriate for it, taking into account that not all Emacs users will customize the variable through Custom. `custom-initialize-reset' has led to several bugs, but all _known_ bugs caused by it have been corrected. Sincerely, Luc.