c-cleanup-list
c-cleanup-list is a variable defined in `
cc-vars.el
'.
Its value is
set-from-style
Documentation:
*List of various C/C++/ObjC constructs to "clean up".
The following clean ups only take place when the auto-newline feature
is turned on, as evidenced by the `/la' appearing next to the mode
name:
brace-else-brace -- Clean up "} else {" constructs by placing
entire construct on a single line. This clean
up only takes place when there is nothing but
white space between the braces and the `else'.
Clean up occurs when the open brace after the
`else' is typed.
brace-elseif-brace -- Similar to brace-else-brace, but clean up
"} else if (...) {" constructs. Clean up
occurs after the open parenthesis and the open
brace.
brace-catch-brace -- Similar to brace-elseif-brace, but clean up
"} catch (...) {" constructs.
empty-defun-braces -- Clean up empty defun braces by placing the
braces on the same line. Clean up occurs when
the defun closing brace is typed.
one-liner-defun -- If the code inside a function body can fit in
a single line, then remove any newlines
between that line and the defun braces so that
the whole body becomes a single line.
`c-max-one-liner-length' gives the maximum
length allowed for the resulting line. Clean
up occurs when the closing brace is typed.
defun-close-semi -- Clean up the terminating semi-colon on defuns
by placing the semi-colon on the same line as
the closing brace. Clean up occurs when the
semi-colon is typed.
list-close-comma -- Clean up commas following braces in array
and aggregate initializers. Clean up occurs
when the comma is typed.
scope-operator -- Clean up double colons which may designate
a C++ scope operator split across multiple
lines. Note that certain C++ constructs can
generate ambiguous situations. This clean up
only takes place when there is nothing but
whitespace between colons. Clean up occurs
when the second colon is typed.
The following clean ups always take place when they are on this list,
regardless of the auto-newline feature, since they typically don't
involve auto-newline inserted newlines:
space-before-funcall -- Insert exactly one space before the opening
parenthesis of a function call. Clean up
occurs when the opening parenthesis is typed.
compact-empty-funcall -- Clean up any space before the function call
opening parenthesis if and only if the
argument list is empty. This is typically
useful together with `space-before-funcall' to
get the style "foo (bar)" and "foo()".
Clean up occurs when the closing parenthesis
is typed.
comment-close-slash -- When a slash is typed after the comment prefix
on a bare line in a c-style comment, the comment
is closed by cleaning up preceding space and
inserting a star if needed.
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).
You can customize this variable.