comparison man/cc-mode.texi @ 71224:b7261e09f8e4

* cc-mode.texi (Getting Started, Indentation Commands, Config Basics) (Custom Filling and Breaking, Custom Braces, Syntactic Symbols) (Line-Up Functions, Custom Macros): * ediff.texi (Window and Frame Configuration) (Highlighting Difference Regions, Highlighting Difference Regions): * emacs-mime.texi (Display Customization): * erc.texi (History): * eshell.texi (Known problems): * eudc.texi (Overview, BBDB): * gnus.texi (NNTP, IMAP, Advanced Scoring Examples) (The problem of spam, SpamOracle, Extending the Spam package) (Conformity, Terminology): * idlwave.texi (Routine Info, Routine Info) (Class and Keyword Inheritance, Padding Operators) (Breakpoints and Stepping, Electric Debug Mode) (Examining Variables, Troubleshooting): * org.texi (Creating timestamps): * reftex.texi (Commands, Options, Changes): * tramp.texi (Inline methods, Password caching) (Auto-save and Backup, Issues): * vip.texi (Files, Commands in Insert Mode): * viper.texi (Emacs Preliminaries, States in Viper) (Packages that Change Keymaps, Viper Specials, Groundwork): * xresmini.texi (GTK resources): Fix various typos.
author Romain Francoise <romain@orebokech.com>
date Mon, 05 Jun 2006 11:44:42 +0000
parents 11b616eddda4
children 3947a80cfe22 46b1096093f5 a8190f7e546e
comparison
equal deleted inserted replaced
71223:31d9cfc257a4 71224:b7261e09f8e4
206 206
207 @page 207 @page
208 @vskip 0pt plus 1filll 208 @vskip 0pt plus 1filll
209 @insertcopying 209 @insertcopying
210 210
211 This manual was generated from $Revision: 1.36 $ of $RCSfile: cc-mode.texi,v $, which can be 211 This manual was generated from $Revision$ of $RCSfile$, which can be
212 downloaded from 212 downloaded from
213 @url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/man/cc-mode.texi}. 213 @url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/man/cc-mode.texi}.
214 @end titlepage 214 @end titlepage
215 215
216 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 216 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
505 @end example 505 @end example
506 506
507 @item The (indentation) style 507 @item The (indentation) style
508 The basic ``shape'' of indentation created by @ccmode{}---by default, 508 The basic ``shape'' of indentation created by @ccmode{}---by default,
509 this is @code{gnu} style (except for Java and AWK buffers). A list of 509 this is @code{gnu} style (except for Java and AWK buffers). A list of
510 the availables styles and their descriptions can be found in 510 the available styles and their descriptions can be found in
511 @ref{Built-in Styles}. A complete specification of the @ccmode{} 511 @ref{Built-in Styles}. A complete specification of the @ccmode{}
512 style system, including how to create your own style, can be found in 512 style system, including how to create your own style, can be found in
513 the chapter @ref{Styles}. To set your style to @code{linux}, either 513 the chapter @ref{Styles}. To set your style to @code{linux}, either
514 customize @code{c-default-style} or put this into your @file{.emacs}: 514 customize @code{c-default-style} or put this into your @file{.emacs}:
515 515
670 @findex indent-command (c-) 670 @findex indent-command (c-)
671 This command indents the current line. That is all you need to know 671 This command indents the current line. That is all you need to know
672 about it for normal use. 672 about it for normal use.
673 673
674 @code{c-indent-command} does different things, depending on the 674 @code{c-indent-command} does different things, depending on the
675 settting of @code{c-syntactic-indentation} (@pxref{Indentation Engine 675 setting of @code{c-syntactic-indentation} (@pxref{Indentation Engine
676 Basics}): 676 Basics}):
677 677
678 @itemize @bullet 678 @itemize @bullet
679 @item 679 @item
680 When it's non-@code{nil} (which it normally is), the command indents 680 When it's non-@code{nil} (which it normally is), the command indents
2126 @node Config Basics, Custom Filling and Breaking, Font Locking, Top 2126 @node Config Basics, Custom Filling and Breaking, Font Locking, Top
2127 @comment node-name, next, previous, up 2127 @comment node-name, next, previous, up
2128 @chapter Configuration Basics 2128 @chapter Configuration Basics
2129 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2129 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2130 2130
2131 @cindex Emacs Initiliazation File 2131 @cindex Emacs Initialization File
2132 @cindex Configuration 2132 @cindex Configuration
2133 You configure @ccmode{} by setting Lisp variables and calling (and 2133 You configure @ccmode{} by setting Lisp variables and calling (and
2134 perhaps writing) Lisp functions@footnote{DON'T PANIC!!! This isn't 2134 perhaps writing) Lisp functions@footnote{DON'T PANIC!!! This isn't
2135 difficult.}, which is usually done by adding code to an Emacs 2135 difficult.}, which is usually done by adding code to an Emacs
2136 initialization file. This file might be @file{site-start.el} or 2136 initialization file. This file might be @file{site-start.el} or
2912 variable@footnote{In versions before 5.26, this variable was called 2912 variable@footnote{In versions before 5.26, this variable was called
2913 @code{c-comment-continuation-stars}. As a compatibility measure, 2913 @code{c-comment-continuation-stars}. As a compatibility measure,
2914 @ccmode{} still uses the value on that variable if it's set.} is used 2914 @ccmode{} still uses the value on that variable if it's set.} is used
2915 then as the comment prefix. It defaults to @samp{* 2915 then as the comment prefix. It defaults to @samp{*
2916 }@footnote{Actually, this default setting of 2916 }@footnote{Actually, this default setting of
2917 @code{c-block-comment-prefix} typically gets overriden by the default 2917 @code{c-block-comment-prefix} typically gets overridden by the default
2918 style @code{gnu}, which sets it to blank. You can see the line 2918 style @code{gnu}, which sets it to blank. You can see the line
2919 splitting effect described here by setting a different style, 2919 splitting effect described here by setting a different style,
2920 e.g. @code{k&r} @xref{Choosing a Style}.}, which makes a comment 2920 e.g. @code{k&r} @xref{Choosing a Style}.}, which makes a comment
2921 2921
2922 @example 2922 @example
3207 Syntactic symbols aren't the only place where you can customize 3207 Syntactic symbols aren't the only place where you can customize
3208 @ccmode{} with the lisp equivalent of callback functions. Remember 3208 @ccmode{} with the lisp equivalent of callback functions. Remember
3209 that @var{action}s are usually a list containing some combination of 3209 that @var{action}s are usually a list containing some combination of
3210 the symbols @code{before} and @code{after} (@pxref{Hanging Braces}). 3210 the symbols @code{before} and @code{after} (@pxref{Hanging Braces}).
3211 For more flexibility, you can instead specify brace ``hanginess'' by 3211 For more flexibility, you can instead specify brace ``hanginess'' by
3212 giving a synctactic symbol an @dfn{action function} in 3212 giving a syntactic symbol an @dfn{action function} in
3213 @code{c-hanging-braces-alist}; this function determines the 3213 @code{c-hanging-braces-alist}; this function determines the
3214 ``hanginess'' of a brace, usually by looking at the code near it. 3214 ``hanginess'' of a brace, usually by looking at the code near it.
3215 3215
3216 @cindex customization, brace hanging 3216 @cindex customization, brace hanging
3217 An action function is called with two arguments: the syntactic symbol 3217 An action function is called with two arguments: the syntactic symbol
4022 @item inclass 4022 @item inclass
4023 The line is nested inside a class definition. @ref{Class Symbols}. 4023 The line is nested inside a class definition. @ref{Class Symbols}.
4024 @item cpp-macro 4024 @item cpp-macro
4025 The start of a preprocessor macro definition. @ref{Literal Symbols}. 4025 The start of a preprocessor macro definition. @ref{Literal Symbols}.
4026 @item cpp-define-intro 4026 @item cpp-define-intro
4027 The first line inside a multiline preproprocessor macro if 4027 The first line inside a multiline preprocessor macro if
4028 @code{c-syntactic-indentation-in-macros} is set. @ref{Multiline Macro 4028 @code{c-syntactic-indentation-in-macros} is set. @ref{Multiline Macro
4029 Symbols}. 4029 Symbols}.
4030 @item cpp-macro-cont 4030 @item cpp-macro-cont
4031 All lines inside multiline preprocessor macros if 4031 All lines inside multiline preprocessor macros if
4032 @code{c-syntactic-indentation-in-macros} is @code{nil}. 4032 @code{c-syntactic-indentation-in-macros} is @code{nil}.
5309 offset itself (such as @code{+} or @code{[0]}) or it's @code{nil}, 5309 offset itself (such as @code{+} or @code{[0]}) or it's @code{nil},
5310 meaning ``this function is inappropriate in this case - try a 5310 meaning ``this function is inappropriate in this case - try a
5311 different one''. @xref{c-offsets-alist}. 5311 different one''. @xref{c-offsets-alist}.
5312 5312
5313 The subsections below describe all the standard line-up functions, 5313 The subsections below describe all the standard line-up functions,
5314 categorized by the sort of token the lining-up centres around. For 5314 categorized by the sort of token the lining-up centers around. For
5315 each of these functions there is a ``works with'' list that indicates 5315 each of these functions there is a ``works with'' list that indicates
5316 which syntactic symbols the function is intended to be used with. 5316 which syntactic symbols the function is intended to be used with.
5317 5317
5318 @macro workswith 5318 @macro workswith
5319 @emph{Works with:@ } 5319 @emph{Works with:@ }
6431 @cindex macros 6431 @cindex macros
6432 @cindex preprocessor directives 6432 @cindex preprocessor directives
6433 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6433 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6434 6434
6435 Normally, the lines in a multi-line macro are indented relative to 6435 Normally, the lines in a multi-line macro are indented relative to
6436 eachother as though they were code. You can suppress this behaviour 6436 each other as though they were code. You can suppress this behaviour
6437 by setting the following user option: 6437 by setting the following user option:
6438 6438
6439 @defopt c-syntactic-indentation-in-macros 6439 @defopt c-syntactic-indentation-in-macros
6440 @vindex syntactic-indentation-in-macros (c-) 6440 @vindex syntactic-indentation-in-macros (c-)
6441 Enable syntactic analysis inside macros, which is the default. If this 6441 Enable syntactic analysis inside macros, which is the default. If this