A quick look at the code shows that evil-mode
is a global minor mode, so it affects all buffers.
The functions turn-on-evil-mode
and turn-off-evil-mode
are provided to enable or disable evil for the current buffer only (these functions enable or disable evil-local-mode
, which is the per-buffer mode), however global minor modes enable themselves after mode hooks have run (see automatically disable a global minor mode for a specific major mode) so it's best to see whether the global mode has some built-in support for disabling itself in specified circumstances.
In the case of evil-mode, it looks like the various "state" options facilitate this, with 'Emacs state' ("emacs"
) disabling all the Evil key-bindings, and (evil-set-initial-state MODE STATE)
letting you configure the default state for a specified major mode.
So unless the incompatibility runs deeper than keybindings, I imagine that the following will do the trick, after loading the Evil library:
(evil-set-initial-state 'term-mode "emacs")