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

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

Re: font-lock problems


From: Tim X
Subject: Re: font-lock problems
Date: 20 Sep 2005 19:25:36 +1000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Mads Jensen <spam@raptus.dk> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > > (font-lock-add-keywords
> > 
> > Major modes shouldn't use font-lock-add-keywords for keywords that are
> > always highlighted.  It would only make sense for things which change
> > dynamically (i.e. very rare).
> 
> How am I supposed to get the words colored ? I have more things to
> colorize, but I hope that it'll be easier to make that after learning
> how to colorize something in the first place. Someone once pointed me to
> (info "(elisp)Face foreground") (or something like that), which wasn't
> of any help to me, as I see it. 
> -- 

Use the source Luke!

Have a look at a simple mode to get the best way to do it. I found
sql.el (part of the emacs distribution) to be very straight forward
and gave me everything I needed in creating a very basic
mode. Unfortunately that was a few years backa nd I've since stopped
using the mode I created and cannot find its original source. However,
I do remember sql.el put me in the right direction on things like
font-locking, the use of the syntax table, handling of comments and
different comment styles etc. 

Tim
-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!


reply via email to

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