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: Defcustom write-file-functions and write-contents-functions? Date: Wed, 31 Dec 2003 10:57:13 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200312311657.hBVGvD428945@raven.dms.auburn.edu> References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1072890019 21128 80.91.224.253 (31 Dec 2003 17:00:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2003 17:00:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Dec 31 18:00:10 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Abjha-0006xU-00 for ; Wed, 31 Dec 2003 18:00:10 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Abjha-00079P-00 for ; Wed, 31 Dec 2003 18:00:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Abkcv-0001rd-Kw for emacs-devel@quimby.gnus.org; Wed, 31 Dec 2003 12:59:25 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Abkcl-0001o1-Ot for emacs-devel@gnu.org; Wed, 31 Dec 2003 12:59:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbkcF-0001JL-B7 for emacs-devel@gnu.org; Wed, 31 Dec 2003 12:59:14 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbkcE-0001IS-Uf for emacs-devel@gnu.org; Wed, 31 Dec 2003 12:58:43 -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 hBVGvTKk008753; Wed, 31 Dec 2003 10:57:29 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id hBVGvD428945; Wed, 31 Dec 2003 10:57:13 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: jas@extundo.com In-reply-to: (message from Simon Josefsson on Wed, 31 Dec 2003 15:38:07 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18928 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18928 Do you really want to make those two functions customizable through Custom? They seem to be intended to be used by programs. They are tricky. They are not normal hooks. The order matters a lot. If a user naively adds a function that returns a non-nil value, big surprises may result. Not something one might want the average user to start playing apprentice sorcerer with. (_Any_ Lisp variable is customizable by a sophisticated user by writing Lisp code in .emacs or files loaded by .emacs.) Custom sets _global_ values and these two hooks are intended to be file-specific and hence buffer-local. I do not know how you envision the average user to use these defcustoms. Would the customizability you want to achieve not be better served by adding a defcustom for a new no-tricks _normal_ hook, say `before_save_hook', called before the other two? (If there already would be a hook of this type, then it should be documented in (elisp)Saving Buffers.) Sincerely, Luc.