From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Wed, 25 May 2005 11:36:11 -0500 (CDT) Message-ID: <200505251636.j4PGaB024563@raven.dms.auburn.edu> References: <87y8a3mnz8.fsf@xs4all.nl> <87ll63weye.fsf-monnier+emacs@gnu.org> <87wtpnl38q.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117039294 1455 80.91.229.2 (25 May 2005 16:41:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 May 2005 16:41:34 +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 18:41:33 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dayw4-000560-Ai for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 18:40:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dayzx-0006Q5-V6 for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 12:44:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dayy3-0005Y9-PS for emacs-devel@gnu.org; Wed, 25 May 2005 12:42:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dayy1-0005Wj-9Z for emacs-devel@gnu.org; Wed, 25 May 2005 12:42:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dayxz-0005S0-Qr for emacs-devel@gnu.org; Wed, 25 May 2005 12:42:48 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DaysN-0004D7-1s for emacs-devel@gnu.org; Wed, 25 May 2005 12:36:59 -0400 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 j4PGaVCK006541; Wed, 25 May 2005 11:36:31 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4PGaB024563; Wed, 25 May 2005 11:36:11 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: Lute.Kamstra.lists@xs4all.nl In-reply-to: <87wtpnl38q.fsf@xs4all.nl> (message from Lute Kamstra on Wed, 25 May 2005 17:44:21 +0200) 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:37625 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37625 Lute Kamstra wrote: It is a problem in combination with a global minor mode defined with define-global-minor-mode since this change: 2005-05-22 Luc Teirlinck * emacs-lisp/easy-mmode.el (define-global-minor-mode): Use `after-change-major-mode-hook' instead of `find-file-hook'. See another message of mine in this thread. I guess `define-global-minor-mode' could use both `after-change-major-mode-hook' and `find-file-hook', although unless special care is taken, that could mean that the hook function is run twice. But that would not eliminate the need for modes to run `after-change-major-mode-hook' at their end. The code before I changed it failed if the mode was run from a timer or by a process. The fallback for modes that do not use `after-change-major-mode-hook' yet is post-command-hook. Even without `after-change-major-mode-hook' things should work out OK if you do `M-x org-mode' or visit a file with `C-x C-f'. I believe that the only problems should be modes run from timers or processes. Sincerely, Luc.