On Thu, Nov 17, 2011 at 13:48, Michael Markert <[email protected]> wrote:
On 17 Nov 2011, Nikolai Weibull wrote:
Sure, but in this case I’m still not clear if this is a problem with Evil or not. The problem is that revert-buffer is told to not restore local modes. The question is thus whether magit is doing things right by not restoring local modes and Evil shouldn’t be using a local mode or if it’s the other way around.
To answer your previous question: I use magit with evil. But with the global mode so I don't run into problems here.
Ah, might the problem be that I use, for example, (define-key evil-insert-state-local-map "e" 'ruby-electric-end-character) in my ruby-mode-hook? So when magit reverts a ruby buffer, ruby-mode-hook is run, the define-key above is run, but then evil-local-mode is in the wrong state and is turned off instead of on or something?