GNU Info

Info Node: (ccmode)Auto-newline Insertion

(ccmode)Auto-newline Insertion


Next: Hungry-deletion of Whitespace Up: Minor Modes
Enter node , (file) or (file)node

Auto-newline Insertion
======================

   Auto-newline minor mode works by enabling certain "electric
commands".  Electric commands are typically bound to special characters
such as the left and right braces, colons, semi-colons, etc., which when
typed, perform some magic formatting in addition to inserting the typed
character.  As a general rule, electric commands are only electric when
the following conditions apply:

   * Auto-newline minor mode is enabled, as evidenced by a `C/a' or
     `C/ah' indicator on the modeline.

   * The character was not typed inside of a literal (1).

   * No numeric argument was supplied to the command (i.e. it was typed
     as normal, with no `C-u' prefix).


Hanging Braces
Hanging Colons
Hanging Semi-colons and Commas
Other Electric Commands
Clean-ups
   ---------- Footnotes ----------

   (1) A "literal" is defined as any comment, string, or C preprocessor
macro definition.  These constructs are also known as "syntactic
whitespace" since they are usually ignored when scanning C code.


automatically generated by info2www version 1.2.2.9