* font-lock-add-keywords: should font-lock-mode be turned off/on after that
@ 2009-05-29 17:50 Lennart Borgman
2009-05-29 17:56 ` Lennart Borgman
2009-05-30 20:28 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-05-29 17:50 UTC (permalink / raw)
To: Emacs-Devel devel; +Cc: Zoltán Nagy
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: font-lock-add-keywords: should font-lock-mode be turned off/on after that
2009-05-29 17:50 font-lock-add-keywords: should font-lock-mode be turned off/on after that Lennart Borgman
@ 2009-05-29 17:56 ` Lennart Borgman
2009-05-30 20:28 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-05-29 17:56 UTC (permalink / raw)
To: Emacs-Devel devel; +Cc: Zoltán Nagy
After sending this I got an idea that there might be a bug in
font-lock-add-keywords when mode is nil. It seems to be so. Setting
(font-lock-add-keywords 'php-mode doxymacs-doxygen-keywords)
make it works and then it works in mumamo too.
On Fri, May 29, 2009 at 7:50 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> 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?
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: font-lock-add-keywords: should font-lock-mode be turned off/on after that
2009-05-29 17:50 font-lock-add-keywords: should font-lock-mode be turned off/on after that Lennart Borgman
2009-05-29 17:56 ` Lennart Borgman
@ 2009-05-30 20:28 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2009-05-30 20:28 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Zoltán Nagy, Emacs-Devel devel
> 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?
Yes.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-30 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-29 17:50 font-lock-add-keywords: should font-lock-mode be turned off/on after that Lennart Borgman
2009-05-29 17:56 ` Lennart Borgman
2009-05-30 20:28 ` Stefan Monnier
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).