emacs-devel
[Top][All Lists]
Advanced

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

Re: org-mode and mode hooks.


From: Richard Stallman
Subject: Re: org-mode and mode hooks.
Date: Sun, 05 Jun 2005 05:47:08 -0400

    In addition to that, there would be a problem with major modes that do
    follow the conventions but call font-lock-{add,remove}-keywords with
    nil for MODE in their body instead of their hook.  Major modes are not
    supposed to do that.  A nil argument was not designed to be used that
    way and you said:

       I just looked for all the calls to font-lock-add-keywords in Emacs.
       In no case does any major mode call font-lock-add-keywords directly,
       or even fairly directly.

No major mode calls font-lock-add-keywords directly, or even fairly
directly.  However, I have not done the studying necessary to
determine whether any of those calls could ever possibly be reached
from a major mode function.  And certainly, if a minor mode uses
font-lock-add-keywords, and then people use define-global-minor-mode
to make a global version of it, then font-lock-add-keywords will be
called from major modes through after-change-major-mode-hook.

Are you saying that kind of use will cause no problem?

If so, could you be more precise about which kinds of uses of
font-lock-add-keywords from a major mode could cause a problem?




reply via email to

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