From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: find-file-hook as illustration of Custom problems Date: Sun, 06 Feb 2005 16:01:57 -0500 Message-ID: References: <200502040036.j140atb03430@raven.dms.auburn.edu> <200502051854.j15IsGZ07501@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1107724568 6518 80.91.229.2 (6 Feb 2005 21:16:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2005 21:16:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 06 22:16:08 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxtkJ-0003JU-Fr for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 22:15:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxtyJ-0005kx-9B for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 16:29:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxtxG-0005R1-EM for emacs-devel@gnu.org; Sun, 06 Feb 2005 16:28:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxtxA-0005NC-HX for emacs-devel@gnu.org; Sun, 06 Feb 2005 16:28:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxtx9-0005Jc-Sx for emacs-devel@gnu.org; Sun, 06 Feb 2005 16:28:23 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cxtak-0002mC-Lx for emacs-devel@gnu.org; Sun, 06 Feb 2005 16:05:14 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CxtXZ-0001wo-PW; Sun, 06 Feb 2005 16:01:57 -0500 Original-To: Luc Teirlinck In-reply-to: <200502051854.j15IsGZ07501@raven.dms.auburn.edu> (message from Luc Teirlinck on Sat, 5 Feb 2005 12:54:16 -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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32968 For the case of hooks, we could imagine changing cus-edit.el so that edits made using Custom only affect elements that were installed using Custom. Any other elements could be invisible and untouchable; or they might be displayed in a separate way as "program-added hooks" and untouchable through the usual Custom features. I believe the latter. The user should know that there are other, untouchable things in the list. In effect, this means treating a single list as if it were the combination of too list values, one to be edited through Custom and one to be updated by programs. I guess that Custom could use an internal custom-list-var for every list-var. Everything specified in the definition of the defcustom should be in custom-list-var and hence, removable. The symbol property that records the value according to Custom can serve this purpose. Instead of saying "Changed outside Custom", it can diff the two values to determine which elements were added outside Custom and which were added within it. After Custom is used to change the latter set, it can merge the two sets. custom-set-variable has to handle this too. So something in the type of a list to which elements can be added both through code and through Custom should say that Custom needs to use a custom-list-var. Yes, we could try handling other kinds of lists in the same way if it works for hooks. How do we determine whether a defcustom of type 'sexp' with standard value nil is intended to be a variable length list or not? Don't worry about it yet. One thing at a time.