c-electric-colon

c-electric-colon is an interactive compiled Lisp function in `cc-cmds.el'.


(c-electric-colon ARG)

Insert a colon.

If `c-electric-flag' is non-nil, the colon is not inside a literal and a
numeric ARG hasn't been supplied, the command performs several electric
actions:

(a) If the auto-newline feature is turned on (indicated by "/la" on
the mode line) newlines are inserted before and after the colon based on
the settings in `c-hanging-colons-alist'.

(b) Any auto-newlines are indented. The original line is also
reindented unless `c-syntactic-indentation' is nil.

(c) If auto-newline is turned on, whitespace between two colons will be
"cleaned up" leaving a scope operator, if this action is set in
`c-cleanup-list'.