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: Luc Teirlinck
Subject: Re: org-mode and mode hooks.
Date: Fri, 27 May 2005 10:35:22 -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.

It seems to me, both from docstring and code, that font-lock-defontify
only takes care of the font-lock-face text property.

After changes I will propose later today to fix two bugs in
define-global-minor-mode, (progn (font-lock-mode -1) (font-lock-mode 1))
will reset font-lock for the current mode, if necessary.  (After the
change, font-lock remembers which mode it was set up for.)  I do not
believe that this is an incompatible change, as having font-lock
enabled for the wrong mode makes no sense.

Sincerely,

Luc.




reply via email to

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