我的缩进样式叫什么?有emacs的样式吗?

What is my indentation style called. Is there an emacs style for it?

本文关键字:样式 emacs 什么 缩进 我的      更新时间:2023-10-16

我倾向于这样写代码:

void myfunc()
{
}
if (statement){
    dostuff();
} 
else{
    dootherstuff();
}
switch (var){
    case 1: 
    {
        stuff();
    }
    break;
    case 2:
        stuff();
        break;
};

是否有格式化模式?它叫什么?

如果没有,或者有一个接近它,我如何修改我的.emacs文件,使其正确缩进?

看起来像K&R style