How to change Stroustrap C style in emacs

So, I almost have the C style indentation that I want, but I'm still new to emacs (over vim and other things) and can't seem to find what I want. I have this in the .emacs file and basically it does what I want

(setq c-default-style "stroustrap" c-basic-offset 2)

I would like, however, to have my code indent instead:

void somefunc(
  int someInt,
  char someChar,
  float someFloat
) {
  // Code
}

Namely: ") {". I would like the closing bracket to line up in void void. It would also be nice if my cases backtrack from switch statements when they occur.

+4
source share
1 answer

. , c-add-style (). , , Emacs Wiki.

+2

Source: https://habr.com/ru/post/1668336/


All Articles