Creating a new emacs mode

I’m working on a project in a site-specific language, and I’m wondering how hard it is to write an emacs mode for it to handle things like indentation. (The language itself is very simple; only a few keywords). Does anyone know a pointer to a tutorial on writing such a thing?

Thanks for any help…

I’ve never done it, because emacs is the devil and vi offers our only hope of eternal salvation, but a little quick googling came up with this:

http://cedet.sourceforge.net/addlang.shtml

Sorry I can’t offer more help.