Configures properly all needed modes for emacs