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: Stefan Monnier
Subject: Re: org-mode and mode hooks.
Date: Tue, 31 May 2005 15:08:48 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>    Suppose we make font-lock-add-keywords with nil for MODE
>    record its argument in some permanent buffer-local variable.
>    Then changing the major mode and reenabling font-lock
>    would use the same keywords previously added.

Problem is that some of those keywords should be permanent and others
shouldn't.  E.g. it depends whether they correspond to a minor mode
which is permanent or not.

> That would also change the current behavior when changing a major mode
> interactively.  Currently, it gets rid of these keywords.  When
> changing modes interactively, the situation is thousands of times more
> likely to occur than when changing major modes inside a derived mode.
> Stefan does not seem to consider getting rid of these keywords to be
> a problem when changing modes interactively, although he does consider
> it a problem when it happens in a derived mode.  Maybe there should be

The assumption is that those keywords are added via a function placed on the
major mode's hook, i.e. the keywords tweak the major mode and should thus be
removed/readded when the major mode changes.
Of course in other settings it should behave differently.

The problem is that the API is too simplistic.


        Stefan




reply via email to

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