Disclaimer: I assume this is in no way related to Spacemacs.
The evil-emacs-state-modes
variable is initialized with a list of modes to start in Emacs state. This is a mishap as it makes it harder to customize it properly, any successful change to the variable will not take this value into account and Evil's code will not change it either because the variable is defined and initialized by then. In your example, nothing happens as add-to-list
does only do something if the variable has already been defined. You can circumvent this by using a hook run after the package has been loaded up or with eval-after-load
:
(eval-after-load 'evil-vars '(add-to-list 'evil-emacs-state-modes 'term-mode))
The official way of changing that list though is via evil-set-initial-state
:
(eval-after-load 'evil-vars '(evil-set-initial-state 'term-mode 'emacs))