Flymake is an emacs minor mode that runs a syntax check tool over source files as you write them, on the fly. Essentially it calls the compiler for the relevant language and then parses the warnings.
Because this is so obviously useful, I have it turned on by default in .emacs:
; Highlight syntax errors (require 'flymake) (add-hook 'find-file-hook 'flymake-find-file-hook)
Recall also that I use emacs to view page source in Epiphany. Unfortunately, this produced a nasty dialog box warning about not being able to find an 'xml' command.
The solution comes in two parts:
;;;; xml-specific init-cleanup routines (defun flymake-xml-init () (list "xmlstarlet" (list "val" (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))))
I suppose both emacs packages should really Suggest xmlstarlet - I wonder how many other external programs might fall into that category.