Detecting errors on flight with emacs
The “classic” editors like Emacs and VIM may seem a far surpased thing when nowadays IDEs like NetBeans or Eclipse can detect errors on the code without having to wait to manually compile it to find them (even though this happens mostly with Java, for some strange reason...), nevertheless the modularity of these editors allows to do this fairly simply.
Emacs includes by defaun a “minor-mode” named flymake which allows to do this but some configurations may be needed depending on the language, the Emacs wiki describes how to do i for a number of languages.
But, what if the language is not supported, like Flex or assembler? The solution is simply to write a Makefile with a check-syntax entry which runs the compiling/assembling command on the $(CHK_SOURCES) files, for example:
1 2 3 4 |
|
When activating flymake-mode, it may disable itself automatically because it interprets
the file extension as not valid for it, can be added to the allowed list with
1 2 3 |
|
And now assembly can be programmed with the realtime alerts of any IDE.