At Wed, 17 Sep 2003 10:18:27 +1000, Andy Eager wrote:
> I have designed the language & written an interpreter for it, but would 
> like emacs to do some syntax highlighting for me.

After you've written the rest of your major mode (which gives details
like syntax definitions (what constitutes a "word", etc), any relevant
functions/keybindings, etc) then you need to give a list of
keywords/regexps to highlight.

On XEmacs, you need to put a `font-lock-defaults' property on the
major mode symbol, on FSF Emacs you put an entry into
`font-lock-defaults-alist'.  Luckily its the same entry in both cases
(unless you use exotic features).

See the comments and docstrings in font-lock.el, particularly for
`font-lock-defaults'.


Start reading the lispref.info section on writing major modes and go
from there - its not too hard if you're already familiar with elisp.

-- 
 - Gus
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to