[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: Tue, 31 May 2005 11:30:58 -0500 (CDT)

Richard Stallman wrote:

   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.

As I already said, if that variable _needs_ to be permanent local, then
there are already other problems right now with Font Lock, which are
thousands of times more likely to occur than the ones we are worrying
about right now.  If it does not need to be permanent local, it
appears to duplicate font-lock-keywords-alist, so one can quite as
well use that one.

It would seem easy to make font-lock-{add,remove}-keywords, with a nil
argument for MODE, add/remove the keyword to font-lock-keywords-alist
in addition to enabling or disabling the keyword instantaneously.

Stefan can tell whether that would solve the present problem (I
believe it would) without introducing new unrelated ones (I do not
know about that).



reply via email to

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