From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: [Martin.Buchmann@uni-jena.de: Re: erase customization does not work] Date: Thu, 17 Nov 2005 22:39:20 -0600 (CST) Message-ID: <200511180439.jAI4dKo08447@raven.dms.auburn.edu> References: <200511180054.jAI0sSh07595@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1132288914 10137 80.91.229.2 (18 Nov 2005 04:41:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2005 04:41:54 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 18 05:41:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ecy2l-0003ot-Ui for ged-emacs-devel@m.gmane.org; Fri, 18 Nov 2005 05:40:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ecy2l-0006Sr-3i for ged-emacs-devel@m.gmane.org; Thu, 17 Nov 2005 23:40:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ecy2X-0006Rm-EZ for emacs-devel@gnu.org; Thu, 17 Nov 2005 23:39:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ecy2W-0006Ra-V0 for emacs-devel@gnu.org; Thu, 17 Nov 2005 23:39:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ecy2W-0006RX-Rg for emacs-devel@gnu.org; Thu, 17 Nov 2005 23:39:56 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ecy2W-0001xr-7Q; Thu, 17 Nov 2005 23:39:56 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id jAI4dtmD028536; Thu, 17 Nov 2005 22:39:55 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id jAI4dKo08447; Thu, 17 Nov 2005 22:39:20 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200511180054.jAI0sSh07595@raven.dms.auburn.edu> (message from Luc Teirlinck on Thu, 17 Nov 2005 18:54:28 -0600 (CST)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Thu, 17 Nov 2005 22:39:55 -0600 (CST) 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:46210 Archived-At: >>From my prior message: The following would make the buffer-wide "Erase Customization" button work probably as well as the "Reset" and "Reset to saved" buttons: (defun Custom-reset-standard (&rest ignore) "Erase all customization (either current or saved) for the group members. The immediate result is to restore them to their standard settings. This operation eliminates any saved settings for the group members, making them as if they had never been customized at all." (interactive) (let ((children custom-options)) (mapc (lambda (widget) (when (memq (widget-get widget :custom-state) '(modified set changed saved rogue)) (widget-apply widget :custom-reset-standard))) children))) *I did not heavily test the above function* and do not recommend installing it, Maybe some further remarks. Apart from the fact that the "Erase Customization" buttons are especially dangerous to an inadvertent user, I feel reasonably confident that the above works _as well as_ the code for the buffer-wide "Reset" and "Reset to Saved" buttons. What I did was just remove the same type of conditionals that the change three years ago removed. However, if there were any problems with the change to the "Reset" and "Reset to Saved" button code three years ago, that is if the removed lines were actually sometimes necessary in Custom buffers _other_ than group customization buffers, then nobody would have noticed any of the involved bugs in the meantime (even if some bugs would be very obvious or severe), just like nobody noticed that these buttons were no-ops in the prior five and a half years: barely anybody uses these whole buffer buttons. I am not going to spend a lot of time checking whether whether these conditionals might be necessary in some situations in other types of Custom buffers, because these whole buffer buttons are not used (and should not be used) by anybody anyway (_except_ in buffers customizing a single option or face). It is impossible to rely on CVS users or pretesters to discover any involved bugs, for that same reason. Sincerely, Luc.