From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: find-file-hook as illustration of Custom problems Date: Sat, 5 Feb 2005 20:43:13 +0100 Message-ID: <009d01c50bbb$9aa2fd50$0200a8c0@sedrcw11488> References: <200502040036.j140atb03430@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107634512 29279 80.91.229.2 (5 Feb 2005 20:15:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Feb 2005 20:15:12 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 05 21:15:11 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxWKQ-0007LY-Vm for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 21:14:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxWYD-0000ma-MV for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 15:29:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxWW4-0008Mb-0a for emacs-devel@gnu.org; Sat, 05 Feb 2005 15:26:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxWVx-0008JP-3F for emacs-devel@gnu.org; Sat, 05 Feb 2005 15:26:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxWVt-0008A6-LR for emacs-devel@gnu.org; Sat, 05 Feb 2005 15:26:42 -0500 Original-Received: from [81.228.9.113] (helo=av5-1-sn3.vrr.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxVun-0004g9-Mq; Sat, 05 Feb 2005 14:48:22 -0500 Original-Received: by av5-1-sn3.vrr.skanova.net (Postfix, from userid 502) id DCF8237E52; Sat, 5 Feb 2005 20:48:20 +0100 (CET) Original-Received: from smtp1-1-sn3.vrr.skanova.net (smtp1-1-sn3.vrr.skanova.net [81.228.9.177]) by av5-1-sn3.vrr.skanova.net (Postfix) with ESMTP id C93BF37E49; Sat, 5 Feb 2005 20:48:20 +0100 (CET) Original-Received: from sedrcw11488 (t2o58p223.telia.com [62.20.165.223]) by smtp1-1-sn3.vrr.skanova.net (Postfix) with SMTP id 2B8E33800A; Sat, 5 Feb 2005 20:48:15 +0100 (CET) Original-To: , "Luc Teirlinck" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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:32921 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32921 ----- Original Message ----- From: "Richard Stallman" > 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. 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 don't know how hard this would be. Would not this require changes to the run hook functions too? In that case it might be more simple to add a macro (or function) used for creating hooks, maybe "define-hook" that added the normal hook and a second hook used by Custom. (This would of course also require changes to the run hook functions.) This is somewhat in the spirit of define-minor-mode. It would make it rather easy to change all the 400 hooks now defined by defcustom. I assume there would not be big changes necessary to the run hooks functions. It is just to run the hooks in the second list too. (However maybe the marriage between Custom and the C code should feel uncomfortable.)