From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Wed, 25 May 2005 19:28:18 +0200 Message-ID: <87ll639pvx.fsf@xs4all.nl> References: <87y8a3mnz8.fsf@xs4all.nl> <87ll63weye.fsf-monnier+emacs@gnu.org> <87wtpnl38q.fsf@xs4all.nl> <200505251636.j4PGaB024563@raven.dms.auburn.edu> <87vf579r56.fsf@xs4all.nl> <200505251712.j4PHCFC24615@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117043727 16699 80.91.229.2 (25 May 2005 17:55:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 May 2005 17:55:27 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, dominik@science.uva.nl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 25 19:55:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Db051-0007nJ-RZ for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 19:54:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Db08w-0001vx-3x for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 13:58:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Db02v-0005JZ-VS for emacs-devel@gnu.org; Wed, 25 May 2005 13:51:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dazus-0002KE-H0 for emacs-devel@gnu.org; Wed, 25 May 2005 13:43:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dazuo-00028o-GV for emacs-devel@gnu.org; Wed, 25 May 2005 13:43:34 -0400 Original-Received: from [194.109.24.24] (helo=smtp-vbr4.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dazgp-00068a-1j for emacs-devel@gnu.org; Wed, 25 May 2005 13:29:07 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr4.xs4all.nl (8.13.3/8.13.3) with ESMTP id j4PHSJ8o026260; Wed, 25 May 2005 19:28:37 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1Dazg2-0002KX-00; Wed, 25 May 2005 19:28:18 +0200 Original-To: Luc Teirlinck In-Reply-To: <200505251712.j4PHCFC24615@raven.dms.auburn.edu> (Luc Teirlinck's message of "Wed, 25 May 2005 12:12:15 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 20 X-Virus-Scanned: by XS4ALL Virus Scanner 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:37629 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37629 Luc Teirlinck writes: > Lute Kamstra wrote: > > You seem only to consider the problem that GLOBAL-MODE-buffers is not > called. It can also be a problem when it is called too early. > > I agree that if run-mode-hooks is used, it should be run at the very > end. That was the convention even before > `after-change-major-mode-hook' was introduced. > > Actually, confusion arose, because I was looking at the current code > of org-mode, which does not run `after-change-major-mode-hook' at all. It runs after-change-major-mode-hook indirectly: org-mode calls outline-mode, which calls run-mode-hooks, which runs after-change-major-mode-hook. That way, global-font-lock-mode-buffers is first called before org-mode sets font-lock-defaults. Lute.