Variable: c-hanging-colons-alist
c-hanging-colons-alist is a customizable and buffer-local variable
defined in cc-vars.el.gz.
Documentation
Controls the insertion of newlines before and after certain colons.
This variable contains an association list with elements of the following form: (SYNTACTIC-SYMBOL . ACTION).
SYNTACTIC-SYMBOL can be any of: case-label, label, access-label, member-init-intro, or inher-intro.
See the variable c-hanging-braces-alist for the semantics of this
variable. Note however that making ACTION a function symbol is
currently not supported for this variable.
This is a style variable. Apart from the valid values described
above, it can be set to the symbol set-from-style. In that case,
it takes its value from the style system (see c-default-style and
c-style-alist) when a CC Mode buffer is initialized. Otherwise,
the value set here overrides the style system (there is a variable
c-old-style-variable-behavior that changes this, though).
Probably introduced at or before Emacs version 19.23.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
(defcustom-c-stylevar c-hanging-colons-alist nil
"Controls the insertion of newlines before and after certain colons.
This variable contains an association list with elements of the
following form: (SYNTACTIC-SYMBOL . ACTION).
SYNTACTIC-SYMBOL can be any of: case-label, label, access-label,
member-init-intro, or inher-intro.
See the variable `c-hanging-braces-alist' for the semantics of this
variable. Note however that making ACTION a function symbol is
currently not supported for this variable."
:type
`(set ,@(mapcar
(lambda (elt)
`(cons :format "%v"
,(c-constant-symbol elt 20)
(set :format "Newline %v colon\n"
(const :format "%v, " before)
(const :format "%v" after))))
'(case-label label access-label member-init-intro inher-intro)))
:group 'c)