unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Cc: "Zoltán Nagy" <abesto0@gmail.com>
Subject: font-lock-add-keywords: should font-lock-mode be turned off/on after that
Date: Fri, 29 May 2009 19:50:12 +0200	[thread overview]
Message-ID: <e01d8a50905291050ldcc286ava66170d7dfd5b5a2@mail.gmail.com> (raw)

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	other threads:[~2009-05-29 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 17:50 Lennart Borgman [this message]
2009-05-29 17:56 ` font-lock-add-keywords: should font-lock-mode be turned off/on after that Lennart Borgman
2009-05-30 20:28 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50905291050ldcc286ava66170d7dfd5b5a2@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=abesto0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).