evil conflicts in c-mode

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Tue Dec 6 09:44:58 CET 2011

On Tue, Dec 06, 2011 at 12:40:23AM +0000, Jim Green wrote:
> Hi,
> I think I didn't state the issue clear in the post.
> basicall for non c++/c files, RET behaves as expected, it does
> 'evil-ret'.
> but in c++/c files, even in evil normal mode, RET would do
> "new-line-indent", I guess the reason is cc-mode doesn't differentiate
> the evil normal mode or insert mode.

No, when evil is activated RET in normal-state should *not* do
`new-line-indent', even in c++/c files. At least it does not in my box
and I use c++/c every day. (I suppose you mean `newline-and-indent'
because I do not know any function `new-line-indent')

Please test what happens if you execute 'make emacs' (or even 'make
clean emacs') in evil's source directory. This should start a clean
Emacs instance with only evil loaded. Then open some c/c++ file and
look if the problem remains. If yes, there must be a problem with evil
and it would be good if you can provide a minimal example (starting
with 'make emacs') to reproduce the error. Otherwise it's probably a
configuration issue of your emacs.

> Is there a way to make sure whatever major mode emacs is in, in evils
> normal mode, 'RET' would not cause emacs go into insert mode?

RET should never make emacs go to insert mode. At least in no
situation I'm aware of. Again, please provide a minimal example how to
reproduce this error, if possible, otherwise we can't help you.


More information about the implementations-list mailing list