Hanging Braces
Auto-newline insertion
Hanging Semi-colons and commas
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.