>>>>> "Stefan" == Stefan Monnier <[EMAIL PROTECTED]> writes:
Stefan>
Stefan> font-lock-mode-hook is called both when turning the mode ON and
Stefan> when turning the mode OFF.
But I didn't turn it off.
Stefan> font-lock-keywords should not be modified as you do. Instead you
Is that documented somewhere. I've seen similar constructs used quite a few
times (e.g. emacs wiki page).
Stefan> should use font-lock-add-keywords, which knows about
Stefan> font-lock-compile-keywords.
ok, changed it to:
(defun show-tabs () "Show tabs with a slightly changed background"
(font-lock-add-keywords nil '(("[\t]+" (0 'tab-face t)))))
(add-hook 'font-lock-mode-hook 'show-tabs)
and now it looks better, but it still looks a bit odd to me:
(t
(("[ ]+"
(0 'tab-face t)))
("[ ]+"
(0 'tab-face t)))
But at least it doesn't get added over and over again.
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: [EMAIL PROTECTED] |
------------------------------------------
---
If a listener nods his head when you're
explaining your program, wake him up.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel