]> code.delx.au - gnu-emacs/blobdiff - man/cc-mode.texi
Fix markup of keys such as Space and Backspace.
[gnu-emacs] / man / cc-mode.texi
index ac063d4abe5c8c03759c7e5beb38fd25caf31f71..bb730cf6cd2f6ccb565109698362f51c5b5496e9 100644 (file)
@@ -8,7 +8,7 @@
 @finalout
 
 @setfilename  ../info/ccmode
-@settitle     CC Mode Version 5 Documentation
+@settitle     CC Mode Manual
 @footnotestyle end
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @comment Texinfo manual for CC Mode
 @comment Generated from the original README file by Krishna Padmasola
 @comment <krishna@earth-gw.njit.edu>
-@comment 
-@comment Maintained by Barry A. Warsaw and Martin Stjernholm
-@comment <bug-cc-mode@gnu.org> (or <cc-mode-help@python.org>)
+@comment
+@comment Authors:
+@comment Barry A. Warsaw
+@comment Martin Stjernholm
+@comment
+@comment Maintained by Martin Stjernholm <bug-cc-mode@gnu.org>
 @comment 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+@macro copyrightblurb
+Copyright @copyright{} 1995, 96, 97, 98, 99, 2000, 01 Free Software Foundation, Inc.
+@end macro
+
+@comment Info directory entry for use by install-info. The indentation
+@comment here is by request from the FSF folks.
+@dircategory Emacs
+@direntry
+* CC Mode: (ccmode).   Emacs mode for editing C, C++, Objective-C,
+                          Java, Pike, and IDL code.
+@end direntry
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@comment The following line inserts the copyright notice 
+@comment The following lines inserts the copyright notice
 @comment into the Info file.
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-@ifinfo
-Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
-@end ifinfo
+@ifnottex
+Copyright @copyright{} 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
 
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@comment !!!The titlepage section does not appear in the Info file.!!!
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
+``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
 
-@titlepage
-@sp 10
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
 
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
+@end ifnottex
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@comment The title is printed in a large font.
+@comment TeX title page
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-@center @titlefont{CC Mode 5.26}
+@titlepage
+@sp 10
+
+@center @titlefont{CC Mode 5.28}
 @sp 2
 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
 @sp 2
-@center Barry A. Warsaw
-@center Martin Stjernholm
-
-
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@comment  The following two commands start the copyright page
-@comment  for the printed manual.  This will not appear in the Info file.
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+@center Barry A. Warsaw, Martin Stjernholm
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
+Copyright @copyright{} 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
+@sp 1
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
+``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
 @end titlepage
 
-
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @comment The Top node contains the master menu for the Info file.
 @comment This appears only in the Info file, not the printed manual.
@@ -105,11 +142,11 @@ font-locking; there are other Emacs packages for that.
 * Syntactic Symbols::
 * Indentation Functions::
 * Performance Issues::
+* Limitations and Known Bugs::
 * Frequently Asked Questions::
 * Getting the Latest CC Mode Release::
-* Sample .emacs File::
-* Limitations and Known Bugs::
 * Mailing Lists and Submitting Bug Reports::
+* Sample .emacs File::
 
  --- Indices ---
 
@@ -184,10 +221,11 @@ milestone in the mode's life.  It has been fully merged back with Emacs
 19's @file{c-mode.el}. Also a new, more intuitive and flexible mechanism
 for controlling indentation has been developed.  Late in 1997, Martin
 joined the @ccmode{} Maintainers Team, and implemented the Pike support.
+As of 2000 Martin has taken over as the sole maintainer.
 
 This manual describes @ccmode{}
 @comment The following line must appear on its own, so that the automated
-version 5.26.
+version 5.28.
 @comment Release.py script can update the version number automatically
 
 @ccmode{} supports the editing of K&R and ANSI C, @dfn{ARM}
@@ -221,7 +259,7 @@ How to customize the new indentation engine.
 @findex java-mode
 @findex idl-mode
 @findex pike-mode
-Note that the name of this package is ``@ccmode{}'', but there is no top
+Note that the name of this package is ``@ccmode{},'' but there is no top
 level @code{cc-mode} entry point.  All of the variables, commands, and
 functions in @ccmode{} are prefixed with @code{c-@var{<thing>}}, and
 @code{c-mode}, @code{c++-mode}, @code{objc-mode}, @code{java-mode},
@@ -605,7 +643,7 @@ to your @file{.emacs} file:
 @example
 
 (add-hook 'c-mode-common-hook
-         '(lambda () (c-toggle-auto-hungry-state 1)))
+         (lambda () (c-toggle-auto-hungry-state 1)))
 
 @end example
 
@@ -811,7 +849,7 @@ zero, hanging them can introduce performance problems.
 Using a mechanism similar to brace hanging (@pxref{Hanging Braces}),
 colons can also be made to hang using the style variable
 @code{c-hanging-colons-alist}.  The syntactic symbols appropriate for
-this assocation list are: @code{case-label}, @code{label},
+this association list are: @code{case-label}, @code{label},
 @code{access-label}, @code{member-init-intro}, and @code{inher-intro}.
 Note however that for @code{c-hanging-colons-alist}, @var{ACTION}s as
 functions are not supported. See also @ref{Custom Brace and Colon
@@ -913,13 +951,15 @@ automatically.
 @cindex clean-ups
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-@dfn{Clean-ups} are a mechanism complementary to colon and brace
-hanging.  On the surface, it would seem that clean-ups overlap the
-functionality provided by the @code{c-hanging-*-alist} variables, and
-similarly, clean-ups are only enabled when auto-newline minor mode is
-enabled.  Clean-ups are used however to adjust code ``after-the-fact'',
-i.e. to eliminate some whitespace that is inserted by electric
-commands, or whitespace that contains intervening constructs.
+@dfn{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 @code{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.
 
 @vindex c-cleanup-list
 @vindex cleanup-list (c-)
@@ -932,12 +972,12 @@ performed when the construct does not occur within a literal
 (@pxref{Auto-newline Insertion}), and when there is nothing but
 whitespace appearing between the individual components of the construct.
 
-There are currently only five specific constructs that @ccmode{}
-can clean up, as indicated by these symbols:
+These are the clean-ups that only are active in the auto-newline minor
+mode:
 
 @itemize @bullet
 @item
-@code{brace-else-brace} --- cleans up @samp{@} else @{} constructs by
+@code{brace-else-brace} --- Clean up @samp{@} else @{} constructs by
 placing the entire construct on a single line.  Clean-up occurs when the
 open brace after the @samp{else} is typed.  So for example, this:
 @example
@@ -969,7 +1009,7 @@ void spam(int i)
 @end example
 
 @item
-@code{brace-elseif-brace} --- similar to the @code{brace-else-brace}
+@code{brace-elseif-brace} --- Similar to the @code{brace-else-brace}
 clean-up, but this cleans up @samp{@} else if (...) @{} constructs.  For
 example:
 @example
@@ -1015,11 +1055,11 @@ void spam(int i)
 @end example
 
 @item
-@code{brace-catch-brace} --- analogous to @code{brace-elseif-brace}, but
+@code{brace-catch-brace} --- Analogous to @code{brace-elseif-brace}, but
 cleans up @samp{@} catch (...) @{} in C++ and Java mode.
 
 @item
-@code{empty-defun-braces} --- cleans up braces following a top-level
+@code{empty-defun-braces} --- Clean up braces following a top-level
 function or class definition that contains no body.  Clean up occurs
 when the closing brace is typed.  Thus the following:
 @example
@@ -1043,9 +1083,9 @@ class Spam
 @end example
 
 @item
-@code{defun-close-semi} --- cleans up the terminating semi-colon on
+@code{defun-close-semi} --- Clean up the terminating semi-colon on
 top-level function or class definitions when they follow a close
-brace. Clean up occurs when the semi-colon is typed.
+brace.  Clean up occurs when the semi-colon is typed.
 So for example, the following:
 @example
 @group
@@ -1071,11 +1111,11 @@ class Spam
 @end example
 
 @item
-@code{list-close-comma} --- cleans up commas following braces in array
+@code{list-close-comma} --- Clean up commas following braces in array
 and aggregate initializers.  Clean up occurs when the comma is typed.
 
 @item
-@code{scope-operator} --- cleans up double colons which may designate a
+@code{scope-operator} --- Clean up double colons which may designate a
 C++ scope operator split across multiple lines@footnote{Certain C++
 constructs introduce ambiguous situations, so @code{scope-operator}
 clean-ups may not always be correct.  This usually only occurs when
@@ -1085,6 +1125,30 @@ in the @code{c-cleanup-list} when you are editing C++ code.
 
 @end itemize
 
+The following clean-ups are always active when they occur on
+@code{c-cleanup-list}, and are thus not affected by the auto-newline
+minor mode:
+
+@itemize @bullet
+@item
+@code{space-before-funcall} --- Insert a space between the function name
+and the opening parenthesis of a function call.  This produces function
+calls in the style mandated by the GNU coding standards,
+e.g. @samp{signal (SIGINT, SIG_IGN)} and @samp{abort ()}.  Clean up
+occurs when the opening parenthesis is typed.
+
+@item
+@code{compact-empty-funcall} --- Clean up any space between the function
+name and the opening parenthesis of a function call that have no
+arguments.  This is typically used together with
+@code{space-before-funcall} if you prefer the GNU function call style
+for functions with arguments but think it looks ugly when it's only an
+empty parenthesis pair.  I.e. you will get @samp{signal (SIGINT,
+SIG_IGN)}, but @samp{abort()}.  Clean up occurs when the closing
+parenthesis is typed.
+
+@end itemize
+
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @node    Hungry-deletion of Whitespace, , Auto-newline Insertion, Minor Modes
@@ -1103,7 +1167,7 @@ hungry-delete in @strong{all} your editing modes!
 In a nutshell, when hungry-delete mode is enabled, hitting the
 @key{Backspace} key@footnote{I say ``hit the @key{Backspace} key'' but
 what I really mean is ``when Emacs receives the @code{BackSpace} key
-event''.  The difference usually isn't significant to most users, but
+event.''  The difference usually isn't significant to most users, but
 advanced users will realize that under window systems such as X, any
 physical key (keycap) on the keyboard can be configured to generate any
 keysym, and thus any Emacs key event.  Also, the use of Emacs on TTYs
@@ -1276,7 +1340,7 @@ E. Jones' Filladapt package@footnote{It's available from
 lack a feature that makes it work suboptimally when
 @code{c-comment-prefix-regexp} matches the empty string (which it does
 by default).  A patch for that is available from
-@uref{http://www.python.org/emacs/cc-mode/,, the CC Mode site}.},
+@uref{http://cc-mode.sourceforge.net/,, the CC Mode site}.},
 which handles things like bulleted lists nicely.  There's a convenience
 function @code{c-setup-filladapt} that tunes the relevant variables in
 Filladapt for use in @ccmode{}.  Call it from a mode hook, e.g. with
@@ -1366,11 +1430,13 @@ The commands that does the actual work follows.
 @findex c-fill-paragraph
 @findex fill-paragraph (c-)
 @cindex Javadoc markup
+@cindex Pike autodoc markup
 @item @kbd{M-q} (@code{c-fill-paragraph})
 This is the replacement for @code{fill-paragraph} in @ccmode{}
 buffers. It's used to fill multiline string literals and both block and
 line style comments.  In Java buffers, the Javadoc markup words are
-recognized as paragraph starters.
+recognized as paragraph starters.  The line oriented Pike autodoc markup
+words are recognized in the same way in Pike mode.
 
 The function keeps the comment starters and enders of block comments as
 they were before the filling.  This means that a comment ender on the
@@ -1650,18 +1716,18 @@ argument, move backward.
 @findex beginning-of-statement (c-)
 @item @kbd{M-a} (@code{c-beginning-of-statement})
 Move point to the beginning of the innermost C statement.  If point is
-already at the beginning of a statement, it moves to the beginning of
-the closest preceding statement, even if that means moving into a block
-(you can use @kbd{M-C-b} to move over a balanced block).  With prefix
+already at the beginning of a statement, move to the beginning of the
+closest preceding statement, even if that means moving into a block (you
+can use @kbd{M-C-b} to move over a balanced block).  With prefix
 argument @var{n}, move back @var{n} @minus{} 1 statements.
 
-If point is within a comment, or next to a comment, this command moves
-by sentences instead of statements.
+If point is within or next to a comment or a string which spans more
+than one line, this command moves by sentences instead of statements.
 
 When called from a program, this function takes three optional
-arguments: the numeric prefix argument, a buffer position limit which is
-the farthest back to search, and a flag to enable moving by sentence
-inside comments.
+arguments: the repetition count, a buffer position limit which is the
+farthest back to search for the syntactic context, and a flag saying
+whether to do sentence motion in or near comments and multiline strings.
 
 @kindex M-e
 @findex c-end-of-statement
@@ -1673,13 +1739,13 @@ inside a nested block (use @kbd{M-C-f} to move to the other side of the
 block).  With prefix argument @var{n}, move forward @var{n} @minus{} 1
 statements.
 
-If point is within a comment, or next to a comment, this command moves
-by sentences instead of statements.
+If point is within or next to a comment or a string which spans more
+than one line, this command moves by sentences instead of statements.
 
 When called from a program, this function takes three optional
-arguments: the numeric prefix argument, a buffer position limit which is
-the farthest back to search, and a flag to enable moving by sentence
-inside comments.
+arguments: the repetition count, a buffer position limit which is the
+farthest back to search for the syntactic context, and a flag saying
+whether to do sentence motion in or near comments and multiline strings.
 
 @findex c-forward-into-nomenclature
 @findex forward-into-nomenclature (c-)
@@ -1778,14 +1844,16 @@ function call programmatically!}.
 @vindex c-basic-offset
 @vindex basic-offset (c-)
 The offset associated with any particular syntactic symbol can be any of
-an integer, a function or lambda expression, a variable name, or one of
-the following symbols: @code{+}, @code{-}, @code{++}, @code{--},
-@code{*}, or @code{/}.  These latter describe offset in multiples of the
-value of the style variable @code{c-basic-offset}.  By defining a
-style's indentation in terms of this fundamental variable, you can
-change the amount of whitespace given to an indentation level while
-maintaining the same basic shape of your code.  Here are the values that
-the special symbols correspond to:
+an integer, a function or lambda expression, a variable name, a vector,
+a list, or one of the following symbols: @code{+}, @code{-}, @code{++},
+@code{--}, @code{*}, or @code{/}.
+
+Those last special symbols describe an offset in multiples of the value
+of the style variable @code{c-basic-offset}.  By defining a style's
+indentation in terms of this fundamental variable, you can change the
+amount of whitespace given to an indentation level while maintaining the
+same basic shape of your code.  Here are the values that the special
+symbols correspond to:
 
 @table @code
 
@@ -1812,6 +1880,9 @@ syntactic symbol is needed to get the desired indentation.
 @xref{Indentation Functions}, and @ref{Custom Indentation Functions},
 for details about them.
 
+If the offset is a vector, its first element sets the absolute
+indentation column, which will override any relative indentation.
+
 @vindex c-strict-syntax-p
 @vindex strict-syntax-p (c-)
 The offset can also be a list, in which case it is evaluated recursively
@@ -2016,12 +2087,13 @@ this manual does not cover how that works.
 
 Variables set like this at the top level in @file{.emacs} take effect in
 all @ccmode{} buffers, regardless of language.  The indentation style
-related variables that you don't set get their value from the style
-system (@pxref{Styles}), and they therefore depend on the setting of
-@code{c-default-style}.  Note that if you use Customize, this means that
-the greyed-out default values presented there might not be the ones you
-actually get, since the actual values depend on the style, which may
-very well be different for different languages.
+related variables, e.g. @code{c-basic-offset}, that you don't set this
+way get their value from the style system (@pxref{Styles}), and they
+therefore depend on the setting of @code{c-default-style}.  Note that if
+you use Customize, this means that the greyed-out default values
+presented there might not be the ones you actually get, since the actual
+values depend on the style, which may very well be different for
+different languages.
 
 If you want to make more advanced configurations, e.g. language-specific
 customization, global variable settings isn't enough.  For that you can
@@ -2090,15 +2162,14 @@ The language hooks get run as the last thing when you enter that
 language mode.  The @code{c-mode-common-hook} is run by all supported
 modes @emph{before} the language specific hook, and thus can contain
 customizations that are common across all languages.  Most of the
-examples in this section will assume you are using the common
-hook.@footnote{@code{java-mode} and the hook variables interact in a
-slightly different way than the other modes.  @code{java-mode} normally
-sets the style of the buffer to @samp{java} @emph{before} running the
-@code{c-mode-common-hook} or @code{java-mode-hook}.  You need to be
-aware of this so that style settings in @code{c-mode-common-hook} don't
-clobber your Java style.  This is arguably bogus, but it's kept for
-historical reasons.  @xref{Built-in Styles}, the documentation of
-@code{c-default-style}, for details.}
+examples in this section will assume you are using the common hook.
+
+Note that all the language-specific mode setup that CC Mode does is done
+prior to both @code{c-mode-common-hook} and the language specific hook.
+That includes installing the indentation style, which can be mode
+specific (and also is by default for Java mode).  Thus, any style
+settings done in @code{c-mode-common-hook} will override whatever
+language-specific style is chosen by @code{c-default-style}.
 
 Here's a simplified example of what you can add to your @file{.emacs}
 file to do things whenever any @ccmode{} language is edited.  See the
@@ -2242,14 +2313,14 @@ Whitesmiths C, an early commercial C compiler.
 @cindex Ellemtel style
 @item
 @code{ellemtel} --- Popular C++ coding standards as defined by
-``Programming in C++, Rules and Recommendations'', Erik Nyquist and Mats
+``Programming in C++, Rules and Recommendations,'' Erik Nyquist and Mats
 Henricson, Ellemtel@footnote{This document is available at
 @uref{http://www.doc.ic.ac.uk/lab/cplus/c++.rules/} among other
 places.}.
 
 @cindex Linux style
 @item
-@code{linux} --- C coding standard for Linux development.
+@code{linux} --- C coding standard for Linux (the kernel).
 
 @cindex Python style
 @item
@@ -2261,8 +2332,9 @@ foreign function interface.  For more information, see
 @cindex Java style
 @findex java-mode
 @item
-@code{java} --- The style for editing Java code.  Note that this style is
-automatically installed when you enter @code{java-mode}.
+@code{java} --- The style for editing Java code.  Note that the default
+value for @code{c-default-style} installs this style when you enter
+@code{java-mode}.
 
 @cindex User style
 @item
@@ -2300,9 +2372,7 @@ mode.  Here are the rules:
 @item
 When @code{c-default-style} is a string, it must be an existing style
 name as found in @code{c-style-alist}.  This style is then used for all
-modes @emph{except} @code{java-mode}, where the style @samp{java} is
-used by default@footnote{This is for backwards compatibility reasons.
-The hard-coding of @code{java-mode} style is admittedly bogus!}.
+modes.
 
 @item
 When @code{c-default-style} is an association list, the current major
@@ -2885,7 +2955,7 @@ A line containing only a comment introduction.
 The first line in an argument list.
 @item arglist-cont
 Subsequent argument list lines when no arguments follow on the same line
-as the the arglist opening paren.
+as the arglist opening paren.
 @item arglist-cont-nonempty
 Subsequent argument list lines when at least one argument follows on the
 same line as the arglist opening paren.
@@ -3450,46 +3520,52 @@ The lines to note in this example include:
 
 @cindex func-decl-cont syntactic symbol
 @item
-line 2, assigned the @code{func-decl-cont} syntax;
+Line 2 is assigned the @code{func-decl-cont} syntax.
 
 @cindex comment-intro syntactic symbol
 @item
-line 4, assigned both @code{defun-block-intro} @emph{and}
-@code{comment-intro} syntax;
+Line 4 is assigned both @code{defun-block-intro} @emph{and}
+@code{comment-intro} syntax.
 
 @cindex c syntactic symbol
 @item
-line 5, assigned @code{c} syntax;
+Line 5 is assigned @code{c} syntax.
 
 @item
 @cindex syntactic whitespace
-line 6 which, even though it contains nothing but whitespace, is
+Line 6 which, even though it contains nothing but whitespace, is
 assigned @code{defun-block-intro}.  Note that the appearance of the
 comment on lines 4 and 5 do not cause line 6 to be assigned
 @code{statement} syntax because comments are considered to be
 @dfn{syntactic whitespace}, which are ignored when analyzing
-code;
+code.
 
 @cindex string syntactic symbol
 @item
-line 8, assigned @code{string} syntax;
+Line 8 is assigned @code{string} syntax.
 
 @cindex label syntactic symbol
 @item
-line 10, assigned @code{label} syntax;
+Line 10 is assigned @code{label} syntax.
 
 @cindex block-open syntactic symbol
 @item
-line 11, assigned @code{block-open} syntax;
+Line 11 is assigned @code{block-open} syntax.
 
 @cindex cpp-macro syntactic symbol
 @cindex cpp-macro-cont syntactic symbol
 @item
-lines 12 and 14, assigned @code{cpp-macro} syntax.
+Lines 12 and 14 are assigned @code{cpp-macro} syntax in addition to the
+normal syntactic symbols (@code{statement-block-intro} and
+@code{statement}, respectively).  Normally @code{cpp-macro} is
+configured to cancel out the normal syntactic context to make all
+preprocessor directives stick to the first column, but that's easily
+changed if you want preprocessor directives to be indented like the rest
+of the code.
 
 @cindex stream-op syntactic symbol
 @item
-line 17, assigned @code{stream-op} syntax.
+Line 17 is assigned @code{stream-op} syntax.
 
 @end itemize
 
@@ -3673,7 +3749,7 @@ For every function below there is a ``works with'' list that indicates
 which syntactic symbols the function is intended to be used with.
 
 @macro workswith
-@emph{Works with:}
+@emph{Works with:}
 @end macro
 @ifinfo
 @unmacro workswith
@@ -3754,10 +3830,41 @@ Line up C++ stream operators (i.e. @samp{<<} and @samp{>>}).
 @findex c-lineup-multi-inher
 @findex lineup-multi-inher (c-)
 @item c-lineup-multi-inher
-Line up the classes in C++ multiple inheritance clauses under each
-other.
+Line up the classes in C++ multiple inheritance clauses and member
+initializers under each other.  E.g:
+@example
+@group
 
-@workswith @code{inher-cont}.
+Foo::Foo (int a, int b):
+    Cyphr (a),
+    Bar (b)              // c-lineup-multi-inher
+
+@end group
+@end example
+@noindent
+and
+@example
+@group
+
+class Foo
+    : public Cyphr,
+      public Bar         // c-lineup-multi-inher
+
+@end group
+@end example
+@noindent
+and
+@example
+@group
+
+Foo::Foo (int a, int b)
+    : Cyphr (a)
+    , Bar (b)            // c-lineup-multi-inher
+
+@end group
+@end example
+
+@workswith @code{inher-cont}, @code{member-init-cont}.
 
 @findex c-lineup-java-inher
 @findex lineup-java-inher (c-)
@@ -4093,9 +4200,9 @@ In the first case the indentation is kept unchanged, in the second
 @findex c-lineup-dont-change
 @findex lineup-dont-change (c-)
 @item c-lineup-dont-change
-This lineup function returns the indentation of the current line.  Think
-of it as an identity function for lineups; it is used for
-@code{cpp-macro-cont} lines.
+This lineup function makes the line stay at whatever indentation it
+already has; think of it as an identity function for lineups.  It is
+used for @code{cpp-macro-cont} lines.
 
 @workswith Any syntactic symbol.
 
@@ -4103,7 +4210,7 @@ of it as an identity function for lineups; it is used for
 
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Performance Issues, Frequently Asked Questions, Indentation Functions, Top
+@node    Performance Issues, Limitations and Known Bugs, Indentation Functions, Top
 @comment node-name, next, previous, up
 @chapter    Performance Issues
 @cindex performance issues
@@ -4203,10 +4310,47 @@ use here; you should read the comments at the top of the file, and look
 at the variable @code{cc-lobotomy-pith-list} for details.
 
 
+@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+@node    Limitations and Known Bugs, Frequently Asked Questions, Performance Issues, Top
+@comment node-name, next, previous, up
+@chapter    Limitations and Known Bugs
+@cindex limitations
+@cindex bugs
+@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+@itemize @bullet
+@item
+Re-indenting large regions or expressions can be slow.
+
+@findex c-indent-exp
+@findex indent-exp (c-)
+@item
+@code{c-indent-exp} has not been fully optimized.  It essentially
+equivalent to hitting @kbd{TAB} (@code{c-indent-command}) on every
+line.  Some information is cached from line to line, but such caching
+invariable causes inaccuracies in analysis in some bizarre situations.
+
+@vindex signal-error-on-buffer-boundary
+@item
+XEmacs versions from 19.15 until (as of this writing 12-Mar-1998) 20.4
+contain a variable called @code{signal-error-on-buffer-boundary}.  This
+was intended as a solution to user interface problems associated with
+buffer movement and the @code{zmacs-region} deactivation on errors.
+However, setting this variable to a non-default value had the
+deleterious side effect of breaking many built-in primitive functions.
+Most users will not be affected since they never change the value of
+this variable.  @strong{Do not set this variable to @code{nil}}; you
+will cause serious problems in @ccmode{} and probably other XEmacs
+packages!  As of at least XEmacs 20.4, the effects this variable tried
+to correct have been fixed in other, better ways.
+
+@end itemize
+
+
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Frequently Asked Questions, Getting the Latest CC Mode Release, Performance Issues, Top
+@node    Frequently Asked Questions, Getting the Latest CC Mode Release, Limitations and Known Bugs, Top
 @comment node-name, next, previous, up
-@chapter    Frequently Asked Questions
+@appendix Frequently Asked Questions
 @cindex frequently asked questions
 @cindex FAQ
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -4262,34 +4406,15 @@ in my @file{.emacs} file but I get an error saying that
 
 @strong{A.} This means that @ccmode{} wasn't loaded into your
 Emacs session by the time the @code{c-set-offset} call was reached,
-mostly likely because @ccmode{} is being autoloaded.  Instead
+most likely because @ccmode{} is being autoloaded.  Instead
 of putting the @code{c-set-offset} line in your top-level
 @file{.emacs} file, put it in your @code{c-mode-common-hook}, or
 simply modify @code{c-offsets-alist} directly:
 @example
-@group
 
-(setq c-offsets-alist (cons '(substatement-open . 0)
-                            c-offsets-alist))
-@end group
-@end example
-
-@sp 1
-@strong{Q.} @emph{My style settings works in all the @ccmode{} language
-modes except for Java, where I still get e.g. 4 column indentation.}
-
-@strong{A.} Java mode switches to the @samp{java} style by default for
-historical reasons.  You can override it by putting an association list
-on @code{c-default-style}:
-@example
-
-(setq c-default-style '((other . "my-style")))
+(setq c-offsets-alist '((substatement-open . 0)))
 
 @end example
-@noindent
-The @samp{other} symbol says that @ccmode{} should use "my-style" in all
-modes not explicitly listed.  Since there's nothing else on the list
-this causes "my-style" to be used in every mode.
 
 @sp 1
 @strong{Q.} @emph{How do I make strings, comments, keywords, and other
@@ -4327,9 +4452,9 @@ in the @file{README} file.
 
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Getting the Latest CC Mode Release, Sample .emacs File, Frequently Asked Questions, Top
+@node    Getting the Latest CC Mode Release, Mailing Lists and Submitting Bug Reports, Frequently Asked Questions, Top
 @comment node-name, next, previous, up
-@chapter    Getting the Latest CC Mode Release
+@appendix Getting the Latest CC Mode Release
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 @ccmode{} is standard with all versions of Emacs since 19.34 and of
@@ -4343,7 +4468,7 @@ compatibility, etc. are all available via the Web at:
 @example
 @group
 
-        @uref{http://www.python.org/emacs/cc-mode/}
+        @uref{http://cc-mode.sourceforge.net/}
 
 @end group
 @end example
@@ -4355,10 +4480,52 @@ distribution (named @code{cc-mode.tar.gz}; a gzip'd tar file), or any of
 the individual files, including PostScript documentation.
 
 
+@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+@node    Mailing Lists and Submitting Bug Reports, Sample .emacs File, Getting the Latest CC Mode Release, Top
+@comment node-name, next, previous, up
+@appendix Mailing Lists and Submitting Bug Reports
+@cindex mailing lists
+@cindex reporting bugs
+@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+@kindex C-c C-b
+@findex c-submit-bug-report
+@findex submit-bug-report (c-)
+To report bugs, use the @kbd{C-c C-b} (@code{c-submit-bug-report})
+command.  This provides vital information we need to reproduce your
+problem.  Make sure you include a concise, but complete code example.
+Please try to boil your example down to just the essential code needed
+to reproduce the problem, and include an exact recipe of steps needed to
+expose the bug.  Be especially sure to include any code that appears
+@emph{before} your bug example, if you think it might affect our ability
+to reproduce it.
+
+Please try to produce the problem in an Emacs instance without any
+customizations loaded (i.e. start it with the @code{-q -no-site-file}
+arguments).  If it works correctly there, the problem might be caused by
+faulty customizations in either your own or your site configuration.  In
+that case, we'd appreciate if you isolate the Emacs Lisp code that trigs
+the bug and include it in your report.
+
+@cindex bug report mailing list
+Bug reports are now sent to the following email addresses:
+@email{bug-cc-mode@@gnu.org} and @email{bug-gnu-emacs@@gnu.org}; the
+latter is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}.  You
+can send other questions and suggestions (kudos? @t{;-)} to
+@email{bug-cc-mode@@gnu.org}.
+
+@cindex announcement mailing list
+If you want to get announcements of new @ccmode{} releases, send the
+word @emph{subscribe} in the body of a message to
+@email{cc-mode-announce-request@@lists.sourceforge.net}.  Announcements
+will also be posted to the Usenet newsgroups @code{gnu.emacs.sources},
+@code{comp.emacs} and @code{comp.emacs.xemacs}.
+
+
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Sample .emacs File, Limitations and Known Bugs, Getting the Latest CC Mode Release, Top
+@node    Sample .emacs File, Concept Index, Mailing Lists and Submitting Bug Reports, Top
 @comment node-name, next, previous, up
-@chapter    Sample .emacs file
+@appendix Sample .emacs file
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 @example
@@ -4389,8 +4556,7 @@ the individual files, including PostScript documentation.
   "My C Programming Style")
 
 ;; offset customizations not in my-c-style
-(setq c-offsets-alist (cons '(member-init-intro . ++)
-                            c-offsets-alist))
+(setq c-offsets-alist '((member-init-intro . ++)))
 
 ;; Customizations for all modes in CC Mode.
 (defun my-c-mode-common-hook ()
@@ -4413,92 +4579,7 @@ the individual files, including PostScript documentation.
 
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Limitations and Known Bugs, Mailing Lists and Submitting Bug Reports, Sample .emacs File, Top
-@comment node-name, next, previous, up
-@chapter    Limitations and Known Bugs
-@cindex limitations
-@cindex bugs
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-@itemize @bullet
-@item
-Re-indenting large regions or expressions can be slow.
-
-@findex c-indent-exp
-@findex indent-exp (c-)
-@item
-@code{c-indent-exp} has not been fully optimized.  It essentially
-equivalent to hitting @kbd{TAB} (@code{c-indent-command}) on every
-line.  Some information is cached from line to line, but such caching
-invariable causes inaccuracies in analysis in some bizarre situations.
-
-@vindex signal-error-on-buffer-boundary
-@item
-XEmacs versions from 19.15 until (as of this writing 12-Mar-1998) 20.4
-contain a variable called @code{signal-error-on-buffer-boundary}.  This
-was intended as a solution to user interface problems associated with
-buffer movement and the @code{zmacs-region} deactivation on errors.
-However, setting this variable to a non-default value had the
-deleterious side effect of breaking many built-in primitive functions.
-Most users will not be affected since they never change the value of
-this variable.  @strong{Do not set this variable to @code{nil}}; you
-will cause serious problems in @ccmode{} and probably other XEmacs
-packages!  As of at least XEmacs 20.4, the effects this variable tried
-to correct have been fixed in other, better ways.
-
-@end itemize
-
-
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Mailing Lists and Submitting Bug Reports, Concept Index, Limitations and Known Bugs, Top
-@comment node-name, next, previous, up
-@chapter    Mailing Lists and Submitting Bug Reports
-@cindex mailing lists
-@cindex reporting bugs
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-@kindex C-c C-b
-@findex c-submit-bug-report
-@findex submit-bug-report (c-)
-To report bugs, use the @kbd{C-c C-b} (@code{c-submit-bug-report})
-command.  This provides vital information we need to reproduce your
-problem.  Make sure you include a concise, but complete code example.
-Please try to boil your example down to just the essential code needed
-to reproduce the problem, and include an exact recipe of steps needed to
-expose the bug.  Be especially sure to include any code that appears
-@emph{before} your bug example, if you think it might affect our ability
-to reproduce it.
-
-Please try to produce the problem in an Emacs instance without any
-customizations loaded (i.e. start it with the @code{-q -no-site-file}
-arguments).  If it works correctly there, the problem might be caused by
-faulty customizations in either your own or your site configuration.  In
-that case, we'd appreciate if you isolate the Emacs Lisp code that trigs
-the bug and include it in your report.
-
-Bug reports are now sent to the following email addresses:
-@email{bug-cc-mode@@gnu.org} and @email{bug-gnu-emacs@@gnu.org}; the
-latter is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}.  You
-can send other questions and suggestions (kudos? @t{;-)} to
-@email{bug-cc-mode@@gnu.org}, or @email{help-gnu-emacs@@gnu.org} which is
-mirrored on newsgroup @code{gnu.emacs.help}.  The old contact address
-@email{cc-mode-help@@python.org} is still active, but its use is
-discouraged.
-
-@cindex beta testers mailing list
-@cindex announcement mailing list
-If you want to get announcements of new @ccmode{} releases, send the word
-@emph{subscribe} in the body of a message to
-@email{cc-mode-announce-request@@python.org}.  Announcements will also
-be posted to the Usenet newsgroups @code{gnu.emacs.sources},
-@code{comp.emacs}, @code{comp.emacs.xemacs}, and possibly some of the
-language oriented newsgroups.  Note that the
-@code{cc-mode-victims@@python.org} mailing list has been
-decommissioned.
-
-
-@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Concept Index, Command Index, Mailing Lists and Submitting Bug Reports, Top
+@node    Concept Index, Command Index, Sample .emacs File, Top
 @comment node-name, next, previous, up
 @unnumbered Concept Index
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -4543,7 +4624,11 @@ Since most @ccmode{} variables are prepended with the string
 @sp 2
 @end iftex
 @printindex vr
+
+@iftex
 @page
 @summarycontents
 @contents
+@end iftex
+
 @bye