[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: |
Fri, 27 May 2005 11:40:15 -0500 (CDT) |
Michael Mauger wrote:
;; Force font lock to reinitialize if it is already on
;; Otherwise, we can wait until it can be started.
(when (and (fboundp 'font-lock-mode)
(boundp 'font-lock-mode)
font-lock-mode)
(font-lock-defontify)
(font-lock-mode -1)
(font-lock-mode 1))
The `defontify' seems to be the ticket to get font-lock to recalc
its settings and actually reperform the fontification. My original
solution used internals from font-lock that were not version
stable.
Actually, contrary to what I said before, the change I will soon
propose might not automatically take care of thew `font-lock-face'
text property. I believe that font-lock relies on a major mode that
sets font-lock-face to disable it, if appropriate, in
change-major-mode-hook. From the docstring:
Clear out all `font-lock-face' properties in current buffer.
A major mode that uses `font-lock-face' properties might want to put
this function onto `change-major-mode-hook'.
Sincerely,
Luc.
- Re: org-mode and mode hooks., (continued)
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/29
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/28
- Re: org-mode and mode hooks., Richard Stallman, 2005/05/29
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/29
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/29
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/27
- Re: org-mode and mode hooks., Michael Mauger, 2005/05/27
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/27
- Re: org-mode and mode hooks.,
Luc Teirlinck <=
- Re: org-mode and mode hooks., Stefan Monnier, 2005/05/27
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/27
- Re: org-mode and mode hooks., Michael Mauger, 2005/05/31
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/27
- Re: org-mode and mode hooks., Richard Stallman, 2005/05/28
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/28
- Re: org-mode and mode hooks., Richard Stallman, 2005/05/26
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/26
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/26
- Re: org-mode and mode hooks., Lute Kamstra, 2005/05/25