[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode and mode hooks.

From: Luc Teirlinck
Subject: Re: org-mode and mode hooks.
Date: Wed, 25 May 2005 11:36:11 -0500 (CDT)

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  <address@hidden>

           * 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

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]