[Top][All Lists]
[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:11 -0400 |
If you call font-lock-{add,remove}-keywords with nil for MODE inside a
parent mode's body instead of its mode hook, the keyword is not
enabled in the derived mode. If the parent mode does call
font-lock-{add,remove}-keywords in its mode hook, the keyword may not be
enabled in the derived mode if any involved mode does not follow the
new conventions.
Thanks.
I think the right solution is simply "don't do that, then".
Major mode functions should not call font-lock-add-keywords
or font-lock-remove-keywords (though the mode hooks may do so).
I will add this to the documentation of font-lock-add-keywords.
@strong{Warning:} major mode functions must not call
@code{font-lock-add-keywords} under any circumstances, either directly
or indirectly. (This would lead to incorrect behavior for some minor
modes.) They should set up for Font Lock mode by setting
@code{font-lock-keywords}.
Problems remain with for minor modes that call
font-lock-{add,remove}-keywords with nil for MODE and add it to the
hook of a major mode that does not follow the conventions or has an
ancestor that does not. Do you consider this to be a problem that
needs to be fixed before the next release? Fixing it would require
non-trivial changes to Font Lock.
We don't need to fix this. Those modes should be fixed.
So, please install your patch.
- Re: org-mode and mode hooks., (continued)
- Re: org-mode and mode hooks., Richard Stallman, 2005/06/03
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/03
- Re: org-mode and mode hooks., Richard Stallman, 2005/06/04
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/04
- Re: org-mode and mode hooks., Stefan Monnier, 2005/06/04
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/04
- Re: org-mode and mode hooks., David Kastrup, 2005/06/04
- Re: org-mode and mode hooks., Richard Stallman, 2005/06/05
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/06
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/04
- Re: org-mode and mode hooks.,
Richard Stallman <=
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/06
- Re: org-mode and mode hooks., Stefan Monnier, 2005/06/07
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/07
- Re: org-mode and mode hooks., Stefan Monnier, 2005/06/07
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/07
- Re: org-mode and mode hooks., Stefan Monnier, 2005/06/08
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/08
- Re: org-mode and mode hooks., Richard Stallman, 2005/06/08
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/06/03
- Re: org-mode and mode hooks., Carsten Dominik, 2005/06/02