help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a font-lock face to a major mode


From: Stefan Monnier
Subject: Re: Adding a font-lock face to a major mode
Date: Thu, 05 Jan 2006 16:01:35 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> I would like to be able to add a font-lock face to a major mode at load
>> time.

> Try font-lock-add-keywords.

Don't listen to what he says: font-lock-add-keywords is not for use by
derived modes, so it's OK to use it if you put it in lisp-mode-hook, but if
you end up creating your own major mode by deriving from lisp-mode, you
should create your own font-lock-defaults value and your own
font-lock-keywords value (built from lisp-font-lock-keywords, of course).


        Stefan "the other one"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]