Suppose I have the following line
double dx = r1 < 1 ? sqrt(r1) - 1 : 1 - sqrt(2 - r1);
I press enter and tab at the colon causing Emacs to align like this:
double dx = r1 < 1 ? sqrt(r1) - 1
: 1 - sqrt(2 - r1);
How can I configure Emacs so that it insteads aligns like this:
double dx = r1 < 1 ? sqrt(r1) - 1
: 1 - sqrt(2 - r1);
That is, the colon should be placed at the same column as the question mark.
I want the same alignment in all languages with this syntactic construct; C, C++, Java, JavaScript etc.