I tend to write code like:
void myfunc()
{
}
if (statement){
dostuff();
}
else{
dootherstuff();
}
switch (var){
case 1:
{
stuff();
}
break;
case 2:
stuff();
break;
};
Is there a formatting mode for this? what’s it called?
If not, or there is one that is close to it, how do I modify my .emacs file to make it indent correctly?
Looks like K&R style.