TAB goes crazy in C/C++ mode
Frank Fischer
frank.fischer at mathematik.tu-chemnitz.de
Wed Jun 5 17:27:34 CEST 2013
Sanel Zukan <sanelz at gmail.com> writes:
> I'm not sure is it me (again) but with the recent pulls my TAB in C or
> C++ mode goes mad sometimes, especially if there are some unusual C
> or C++ constructs.
>
> Here is some example:
>
> ---
>
> #include <stdio.h>
> #include <some-lib.h>
>
> MAGIC_MACRO(X)
>
> class Foo : public Baz {
> private:
> int a;
> int b; <-- sometimes evil gets confused and will not
> allign this variable, but will put it on the begining
> public:
> };
>
> ---
What do you mean by "align this variable"? In my Emacs TAB is bound to
'c-indent-line-or-region. Is this the function you expect?
> When above happens, TAB no loner works (to align the code), unless I
> change the mode.
> behavior: e.g. going to fundamental mode will do nothing, but if I go
> to python-mode, things are restored.
Fundamental mode is special because it does not run any hooks. But it
should be the only exception.
> Any idea what is going on? This bug is not always reproducible, making
> it quite hard to explain steps.
No, I have no idea :(
> My emacs is 24.2.1 (x86_64-redhat-linux-gnu) in daemon mode from
> terminal.
The only change I can think of is git:79ddbf9, which fixed a bug with
terminal, keyboard and emacsclient. So you could try a state before that
one.
>
> PS: I'm seeing TAB is bind to evil-jump-forward so I assume this is
> more Evil bug than Emacs, as someone on Emacs list would already
> notice it.
Yes, but only in normal-state (in fact, C-i is bound to
`evil-jump-forward`, which happens to be the same as TAB in terminal).
In insert state TAB should be bound to whatever it is bound in your
current mode (i.e. evil does not overwrite the binding in insert state).
Best regards,
Frank
More information about the implementations-list
mailing list