emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font-lock-add-keywords: should font-lock-mode be turned off/on after tha


From: Lennart Borgman
Subject: font-lock-add-keywords: should font-lock-mode be turned off/on after that
Date: Fri, 29 May 2009 19:50:12 +0200

If you add keywords

        (font-lock-add-keywords nil doxymacs-doxygen-keywords)

Do you have to do

        (font-lock-mode -1)
        (font-lock-mode 1)

after that? It looks to me from the code like it is not necessary, but
I in the case above font-lock did not work without turning off/on
font-lock. Actually after

(defun my-doxymacs-font-lock ()
  (require 'doxymacs)
  (message "before (doxymacs-font-lock)")
  (doxymacs-font-lock)
  (message "after (doxymacs-font-lock)"))
(add-hook 'php-mode-hook 'my-doxymacs-font-lock)

and doing

   M-x php-mode

there was no fontification at all until font-lock was turned off/on
and then the keywords worked too.

It looks to me that there can be some kind of problem with
doxymacs-doxygen-keywords. Is there some way of checking that? Or is
it something with font-lock-add-keywords?




reply via email to

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