From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: add-hook versus custom-set-variables Date: Wed, 28 Dec 2005 22:24:02 -0500 Message-ID: <87irt87fkp.fsf-monnier+emacs@gnu.org> References: <24044.1135811115@olgas.newt.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135826698 13977 80.91.229.2 (29 Dec 2005 03:24:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2005 03:24:58 +0000 (UTC) Cc: "Davide G. M. Salvetti" , Romain Francoise Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 04:24:42 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EroOr-0007jn-Lz for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2005 04:24:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EroQC-00032g-GF for ged-emacs-devel@m.gmane.org; Wed, 28 Dec 2005 22:25:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EroPx-00032Y-0T for emacs-devel@gnu.org; Wed, 28 Dec 2005 22:25:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EroPv-00032F-Bg for emacs-devel@gnu.org; Wed, 28 Dec 2005 22:25:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EroPv-000328-12 for emacs-devel@gnu.org; Wed, 28 Dec 2005 22:25:27 -0500 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EroQC-0006Im-3q for emacs-devel@gnu.org; Wed, 28 Dec 2005 22:25:44 -0500 Original-Received: from alfajor ([67.71.26.159]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051229032402.ZHIR25777.tomts25-srv.bellnexxia.net@alfajor>; Wed, 28 Dec 2005 22:24:02 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id A91F2D73CB; Wed, 28 Dec 2005 22:24:02 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: <24044.1135811115@olgas.newt.com> (Bill Wohler's message of "Wed, 28 Dec 2005 15:05:15 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] 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:48474 Archived-At: > Two workarounds which aren't pretty are to insist that the user add a > defvar in .emacs for any hook he customizes I don't understand what you're suggesting here. How could a defvar in .emacs help? > ;; MH-E hooks > (eval-after-load 'mh-customize > (progn > (message "Adding mailcrypt hooks to MH-E...") > (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) > (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))) eval-after-load is a function, not a macro. I know it's counter intuitive. Stefan