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?


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to