Emacs syntax highlighting

Also include some minor build fixes.