How can I fix emacs indentation of C++ initializers?
-
30-10-2019 - |
题
Emacs doesn't properly indent C++ class definitions for allocators that have initializers with colons in them. I think that this is because lines with colons are left-indented in many cases.
I would like to fix this.
Here is an example of what I am talking about.
EMACS indents the code like this:
class demo {
int x;
demo(){
}
demo(int y):x(y){
};
};
But it should really indent it like this:
class demo {
int x;
demo(){
}
demo(int y):x(y){
};
};
Is there a way to fix this behavior? Presumably we need some elisp...
Thanks!
没有正确的解决方案
不隶属于 StackOverflow