GNU Emacs Manual - Electric C Go to the first , previous , next , last section, table of contents . With a prefix argument, this command turns the auto-newline feature on if the argument is positive, and off if it is negative. The colon character is electric because that is appropriate for a single colon. If not found, the default is to insert a newline both before and after braces. If the syntactic symbol is not found in this list, no newlines are inserted.
Electric characters can also delete newlines automatically when the auto-newline feature is enabled.
This feature makes auto-newline more acceptable, by deleting the newlines in the most common cases where you do not want them. The variable's value is a list of symbols, each describing one case for possible deletion of a newline. Clean-up occurs when you type the closing brace. Clean-up occurs when you type the semicolon. Clean up commas following braces in array and aggregate initializers.