From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Mail mode and message mode hooks Date: Tue, 01 Dec 2009 14:07:39 -0500 Message-ID: <87ws167bt0.fsf@stupidchicken.com> References: <871vjfwi6a.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259694492 23337 80.91.229.12 (1 Dec 2009 19:08:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2009 19:08:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 01 20:08:01 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFY4s-0008H9-Ok for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2009 20:07:59 +0100 Original-Received: from localhost ([127.0.0.1]:49774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFY4s-0003dE-An for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2009 14:07:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFY4k-0003bk-Ey for emacs-devel@gnu.org; Tue, 01 Dec 2009 14:07:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFY4f-0003a3-Th for emacs-devel@gnu.org; Tue, 01 Dec 2009 14:07:49 -0500 Original-Received: from [199.232.76.173] (port=39317 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFY4f-0003Zu-Ek for emacs-devel@gnu.org; Tue, 01 Dec 2009 14:07:45 -0500 Original-Received: from pantheon-po42.its.yale.edu ([130.132.50.101]:53559) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFY4f-0004c7-10 for emacs-devel@gnu.org; Tue, 01 Dec 2009 14:07:45 -0500 Original-Received: from furry (dhcp128036014216.central.yale.edu [128.36.14.216]) (authenticated bits=0) by pantheon-po42.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id nB1J7dKK015777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 1 Dec 2009 14:07:41 -0500 Original-Received: by furry (Postfix, from userid 1000) id 57084C071; Tue, 1 Dec 2009 14:07:39 -0500 (EST) In-Reply-To: <871vjfwi6a.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 30 Nov 2009 21:18:37 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:118044 Archived-At: Chong Yidong writes: > So, the message-*-hook variables should probably be aliased to the > mail-*-hook variables. On further thought, there is a problem with this. If we defvaralias (e.g.) message-send-hook in message.el, any (add-hook message-send-hook foo) statement in a user's .emacs file will be overwritten when message.el is loaded. One solution is to make message-mode run the mail-*-hooks explicitly, but this may conflict with user customizations that set up both hooks (add-hook 'message-send-hook 'foo) (add-hook 'mail-send-hook 'foo) which is not outside the realm of probability. In this case, running both hooks is clearly not what we want.