I love the ease of customization of Emacs and other text editors, but they're just plain dumb when it comes to knowing programming languages.
I love the ease of customization of Emacs and other text editors, but they're just plain dumb when it comes to knowing programming languages.
Specifically, language recognition is not just regexes in emacs.
I'd make it myself, but between work, thesis and procrastinating on HN, I'm not going to do this anytime soon.
I know there's Semantic [1], but do the typical major modes actually use it? The first line of Semantic's manual says: Ordinarily, Emacs uses regular expressions (and syntax tables) to analyze source code for purposes such as syntax highlighting.
[1] http://www.gnu.org/software/emacs/manual/html_mono/semantic....
But I think the OP's point was you are not limited by it, besides semantic (which I haven't never bothered to setup, there is js2-mode[0] as examples of modes that don't use regexps to operate on the language. There is even js2-refactor[1] built on top of it. You can read about js2-mode origin story here[2], and you would see that lack of threads in elisp hindered its development.
[0]: https://github.com/mooz/js2-mode [1]: https://github.com/magnars/js2-refactor.el [2]: http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascr...
I understand, on principle, why this is not ideal. In practice, I have trouble disagreeing with it. I do find autocomplete nice; though, I have also found that in the instances where I'm having to rely on autocomplete, I'd have been better off using the documentation of whatever I'm doing for a bit to actually have solid grounding before embarking on code.
My point was exactly as the sibling said, that this is by no means all emacs can do.