Emacs mode: inherit from prog-mode

`prog-mode` ensures a final newline when saving files, which is useful
since ninja fails otherwise.

See `require-final-newline` and `mode-require-final-newline`.
Merge pull request #813 from cdlm/emacs-mode-require-newline

Emacs mode: inherit from prog-mode