www.delorie.com/gnu/docs/emacs/cc-mode_12.html   search  
Buy the book!

CC Mode Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1.5 Clean-ups

Clean-ups are mechanisms complementary to colon and brace hanging. On the surface, it would seem that clean-ups overlap the functionality provided by the c-hanging-*-alist variables. Clean-ups are however used to adjust code "after-the-fact," i.e. to adjust the whitespace in constructs after they are typed.

Most of the clean-ups are only applicable to counteract automatically inserted newlines, and will therefore only have any effect if the auto-newline minor mode is turned on. Others will work all the time.

You can configure CC Mode's clean-ups by setting the style variable c-cleanup-list, which is a list of clean-up symbols. By default, CC Mode cleans up only the scope-operator construct, which is necessary for proper C++ support. Note that clean-ups are only performed when the construct does not occur within a literal (see section 4.1 Auto-newline Insertion), and when there is nothing but whitespace appearing between the individual components of the construct.

These are the clean-ups that only are active in the auto-newline minor mode:

The following clean-ups are always active when they occur on c-cleanup-list, and are thus not affected by the auto-newline minor mode:

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003