Next: How to customize indentation in C, C++, and Java buffers?, Previous: How do I make Emacs recognize my compiler’s funny error messages?, Up: Common requests [Contents][Index]
switch
?Many people want to indent their switch
statements like this:
f() { switch(x) { case A: x1; break; case B: x2; break; default: x3; } }
To achieve this, add the following line to your init file (see How do I set up an init file properly?):
(c-set-offset 'case-label '+)