EditorConfigはプロジェクト毎のエディタの設定を統一する。 次のようなファイルをリポジトリに含めてしまうのがよい。
root = true
[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
エディターによっては標準で組込まれているものもあるが、 Emacsは拡張をインストールする必要がある。
https://github.com/editorconfig/editorconfig-emacs
MELPAに登録されているためuse-packageなどを用いてインストールできる。
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))