indentation - Emacs C++-mode indenting for function declarations -


My company's coding standards have changed that function declaration

  void foo A, float * b);   

can now be written as:

  zero foo (int a, float * b);   

Where the variable type and variable name should be vertically aligned.

I am using emacs 23.2 with c ++ - mode.

This mode brings up each variable type but I will not allow variable names to be indented for the match.

Is this a building to allow?

If not, what should I do to allow my variable names individually to be indented?

Maybe what you need MI ( tab-to-tab -stop ).

This will move the cursor to the next tab stop. The tab stop can be configured by the variable tab-stop-list , which is the default for every eight columns. Note that local variables will contain spaces or actual tab letters based on the indent-tabs-mode (be careful not to confuse it with tab-width How does that affect the actual tab characters?)

This will not always give the ultimate name in the least possible column, for example, you

  Expiry with zero foo (int a, float * b); // There are two spaces   

But note that this is somewhat more satisfying - when you add a new ultimate with a long time name, then you need to fix the rest It will not be necessary, you only have to do if you exceed a tab column.

Comments