Re: [SLUG] Emacs custom languages

2003-09-21 Thread Angus Lees
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


[SLUG] Emacs custom languages

2003-09-16 Thread Andy Eager
Hi all,

Anyone know how to write a syntax checker for a new language under emacs?

I want to use emacs to write code in a custom language (called 
Interactive Audio Scripting - IAS).

I have designed the language  written an interpreter for it, but would 
like emacs to do some syntax highlighting for me.

Have checked the emacs site  general google search shows up nothing.
Any clues?
Thanks

Andy

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