Didier Verna writes:
Geoffrey Furnish writes:
Geoffrey> (setq c++-font-lock-keywords c++-font-lock-keywords-gmf)
Geoffrey> (add-hook 'c++-mode-hook '(lambda () (setq font-lock-keywords
Geoffrey> c++-font-lock-keywords-gmf)))
In general, when the first solution fails, it's often
because of a fontification level magic that goes under you
feet. Remeber that you have several levels of fontification
controled by `font-lock-maximum-decoration'.
In other words, it's safer to modify
c++-font-lock-keywords-[1|2|...] and let the code decide which one
it will use (which in turn sets c++-font-lock-keywords on the fly).
Oh yeah, I forgot to mention that I tried doing that, and it didn't
work either. I also read the font-lock.el and concluded that it was
saying that <mode-name>-font-lcok-keywords was the most authoritative
setting.
Can anyone explain to me what has changed in the font lock code that
would cause configuration settings that worked in 19.11->20.4 to fail
in 21.0? I can't really tell if I'm doing something wrong, or if
other beta testers are just not generally in the habit of overiding
the default colorization settings.
'makes me remember: currently, some keywords are
defvar'ed
in font-lock.el, some others are in their respective packages. This
should be fixed (I mean decided once for all) one day.
I agree the situation seems confusing to me. I would like to have a
clear understanding of how to customize font-lock-keywords on a per
mode basis. I thought I had that in the XEmacsen before 21, but with
21 my old code doesn't work, and my attempts to do what the comments
say, is also not working. Any additional advice appreciated.
--
Geoffrey Furnish Actel Corporation furnish(a)actel.com
Senior Staff Engineer 955 East Arques Ave voice: 408-522-7528
Placement & Routing Sunnyvale, CA 94086-4533 fax: 408-328-2303