From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: define-derived-mode runs parent mode hook after evaluating body Date: Fri, 20 Jul 2007 11:00:50 +0200 Message-ID: <46A079C2.4000802@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184922906 14058 80.91.229.12 (20 Jul 2007 09:15:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2007 09:15:06 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 20 11:15:05 2007 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 1IBoZk-0002aB-NL for ged-emacs-devel@m.gmane.org; Fri, 20 Jul 2007 11:15:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBoZk-0001qY-0K for ged-emacs-devel@m.gmane.org; Fri, 20 Jul 2007 05:15:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IBoOb-0006k2-Mt for emacs-devel@gnu.org; Fri, 20 Jul 2007 05:03:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IBoOX-0006jW-GS for emacs-devel@gnu.org; Fri, 20 Jul 2007 05:03:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBoOW-0006jI-5C for emacs-devel@gnu.org; Fri, 20 Jul 2007 05:03:28 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IBoOV-0007uE-GA for emacs-devel@gnu.org; Fri, 20 Jul 2007 05:03:27 -0400 Original-Received: (qmail invoked by alias); 20 Jul 2007 09:03:26 -0000 Original-Received: from N801P028.adsl.highway.telekom.at (EHLO [62.47.44.28]) [62.47.44.28] by mail.gmx.net (mp057) with SMTP; 20 Jul 2007 11:03:26 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX189GAMlVbQ9MPljzkgjC81SLM81ruUVtzqluava7P jSxEwMOn/HATdn User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6 (newer, 1) 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:75164 Archived-At: A subtle bug with `define-derived-mode' I just met with `change-log-mode'. The latter's definition goes as ... (define-derived-mode change-log-mode text-mode "Change Log" "..." (setq left-margin 8 fill-column 74 ... ...but in my .emacs I have: (add-hook 'text-mode-hook '(lambda () (setq fill-column 72))) Consequently, my Change Log buffers have a `fill-column' of 72 which is not really desirable. I obviously don't have any intention to check which of the major modes I eventually use derive from text-mode and add the appropriate hooks there. Is it really useful/needed to delay the hook of the parent mode in a derived mode until after evaluating the body?