CC MODE Version 5 Documentation. Node: Hanging Colons

PREV Hanging Braces UP Auto-newline insertion NEXT Hanging Semi-colons and commas

4.1.2: Hanging Colons

Using a mechanism similar to brace hanging (see Hanging Braces), colons can also be made to hang using the variable c-hanging-colons-alist. The syntactic symbols appropriate for this assocation list are: case-label, label, access-label, member-init-intro, and inher-intro. Note however that for c-hanging-colons-alist, ACTIONs as functions are not supported. See also Custom Brace and Colon Hanging for details.

In C++, double-colons are used as a scope operator but because these colons always appear right next to each other, newlines before and after them are controlled by a different mechanism, called clean-ups in CC Mode. See Clean-ups for details.

PREV Hanging Braces UP Auto-newline insertion NEXT Hanging Semi-colons and commas