>>>> "APA" == Adrian Aichner
<adrian(a)xemacs.org> writes:
APA> this works for me:
APA> (add-hook 'font-lock-mode-hook
APA> '(lambda ()
APA> (cond ((eq major-mode 'python-mode)
APA> (set (make-local-variable 'font-lock-keywords)
APA> python-font-lock-keywords))
APA> ((eq major-mode 'c++-mode)
APA> (set (make-local-variable 'font-lock-keywords)
APA> (append c++-font-lock-keywords
APA> '(("\\<\\(foreach\\)\\>" (1 font-lock-keyword-face
t)))))))))
APA> I guess appending to c++-font-lock-keywords requires some
APA> reinitialization for it to update 'font-lock-keywords in c++-mode.
APA> I haven't spend the time to find that out, but the above seems to work
APA> just as well.
APA> Hope this helps,
Yup, it does! Thanks. If you ever do figure out why it has to be done this
way and not in a cc-mode hook, it would be great to know. Thanks again!
--
Jake Colman -- XEmacs Tinkerer