I'm writing a major mode for editing my custom language sources with Emacs (although I don't know Lisp). Syntax highlighting is very easy to implement, but now I'm trying to setup the auto-indentation and I can't.
I have test this code and it is perfect for '{', '[', ']' and '}' characters. For example, in my tests, if I change "[[{]" regex by "[[:]", it doesn't auto-indent with ':'. Why? I'm going crazy!
My real purpose is to indent blocks between if and endif keywords, and between while and endwhile keywords. For example:
if a > 0
b = 2
while b = 2
a = 0
endwhile
endif