2 ms·
Regex-based or no, most Emacs major modes I've used actually will do this, more or less; if, having configured the mode's indentation and highlighting behavior
by aaronem 13y ago
Regex-based or no, most Emacs major modes I've used actually will do this, more or less; if, having configured the mode's indentation and highlighting behavior to your taste, you find that one or the other stops working properly, it is invariably because you just wrote something that'll
choke the language parser. It won't stop you writing lousy code, but it'll stop you writing broken code, which is in itself a great time saver.
The only reliable exceptions I've found are Perl, which is unsurprising if you know anything about how that language parses, and the PHP modes, all of which bear stigmata of having been written by PHP developers, and each of which is broken in its own special way. Yegge's js2-mode is a notable exception of the opposite, and highly laudable, sort; when you screw something up using that mode, it knows what you did wrong, and uses the echo area to tell you about it.