aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-24 11:06:15 +0000
committerGerd Moellmann2000-07-24 11:06:15 +0000
commitf214c025f74d9b4552272fbe4559b17a01e499f3 (patch)
tree7a526fa9fb3ff2e1141c2c42728901737cacbe95
parent8730a8da6109ed7b2e7e2ed148bd108cc6e430ac (diff)
downloademacs-f214c025f74d9b4552272fbe4559b17a01e499f3.tar.gz
emacs-f214c025f74d9b4552272fbe4559b17a01e499f3.zip
@setfilename to ../info/ccmode.
Documented the change of cpp-macro. Updated doc for c-lineup-multi-inher. Documented the special behavior of c-special-indent-hook as a style variable. Don't talk about doing (c-make-styles-buffer-local t) in a mode hook, since that's already too late to work right.
-rw-r--r--man/cc-mode.texi132
1 files changed, 82 insertions, 50 deletions
diff --git a/man/cc-mode.texi b/man/cc-mode.texi
index 41b71932df1..dbde6f9f56c 100644
--- a/man/cc-mode.texi
+++ b/man/cc-mode.texi
@@ -9,11 +9,6 @@
9 9
10@setfilename ../info/ccmode 10@setfilename ../info/ccmode
11@settitle CC Mode Version 5 Documentation 11@settitle CC Mode Version 5 Documentation
12@dircategory Emacs
13@direntry
14* CC Mode: (cc-mode). Emacs mode for editing C, C++, Objective-C,
15 Java, Pike, and IDL code.
16@end direntry
17@footnotestyle end 12@footnotestyle end
18 13
19@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 14@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -28,11 +23,16 @@
28@comment Generated from the original README file by Krishna Padmasola 23@comment Generated from the original README file by Krishna Padmasola
29@comment <krishna@earth-gw.njit.edu> 24@comment <krishna@earth-gw.njit.edu>
30@comment 25@comment
31@comment Maintained by Barry A. Warsaw and Martin Stjernholm 26@comment Maintained by Martin Stjernholm <bug-cc-mode@gnu.org>
32@comment <bug-cc-mode@gnu.org> (or <cc-mode-help@python.org>)
33@comment 27@comment
34@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35 29
30@comment Info directory entry for use by install-info
31@dircategory Emacs
32@direntry
33* CC Mode: (cc-mode). Emacs mode for editing C, C++, Objective-C,
34 Java, Pike, and IDL code.
35@end direntry
36 36
37@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 37@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38@comment The following line inserts the copyright notice 38@comment The following line inserts the copyright notice
@@ -40,7 +40,7 @@
40@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 40@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41 41
42@ifinfo 42@ifinfo
43Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc. 43Copyright @copyright{} 1995-2000 Free Software Foundation, Inc.
44@end ifinfo 44@end ifinfo
45 45
46@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 46@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -55,11 +55,11 @@ Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
55@comment The title is printed in a large font. 55@comment The title is printed in a large font.
56@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 56@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
57 57
58@center @titlefont{CC Mode 5.26} 58@center @titlefont{CC Mode 5.27}
59@sp 2 59@sp 2
60@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} 60@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
61@sp 2 61@sp 2
62@center Barry A. Warsaw 62@center Current maintainer:
63@center Martin Stjernholm 63@center Martin Stjernholm
64 64
65 65
@@ -70,7 +70,7 @@ Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
70 70
71@page 71@page
72@vskip 0pt plus 1filll 72@vskip 0pt plus 1filll
73Copyright @copyright{} 1995,1996,1997,1998,1999 Free Software Foundation, Inc. 73Copyright @copyright{} 1995-2000 Free Software Foundation, Inc.
74@end titlepage 74@end titlepage
75 75
76 76
@@ -189,10 +189,11 @@ milestone in the mode's life. It has been fully merged back with Emacs
18919's @file{c-mode.el}. Also a new, more intuitive and flexible mechanism 18919's @file{c-mode.el}. Also a new, more intuitive and flexible mechanism
190for controlling indentation has been developed. Late in 1997, Martin 190for controlling indentation has been developed. Late in 1997, Martin
191joined the @ccmode{} Maintainers Team, and implemented the Pike support. 191joined the @ccmode{} Maintainers Team, and implemented the Pike support.
192As of 2000 Martin has taken over as the sole maintainer.
192 193
193This manual describes @ccmode{} 194This manual describes @ccmode{}
194@comment The following line must appear on its own, so that the automated 195@comment The following line must appear on its own, so that the automated
195version 5.26. 196version 5.27.
196@comment Release.py script can update the version number automatically 197@comment Release.py script can update the version number automatically
197 198
198@ccmode{} supports the editing of K&R and ANSI C, @dfn{ARM} 199@ccmode{} supports the editing of K&R and ANSI C, @dfn{ARM}
@@ -1281,7 +1282,7 @@ E. Jones' Filladapt package@footnote{It's available from
1281lack a feature that makes it work suboptimally when 1282lack a feature that makes it work suboptimally when
1282@code{c-comment-prefix-regexp} matches the empty string (which it does 1283@code{c-comment-prefix-regexp} matches the empty string (which it does
1283by default). A patch for that is available from 1284by default). A patch for that is available from
1284@uref{http://www.python.org/emacs/cc-mode/,, the CC Mode site}.}, 1285@uref{http://cc-mode.sourceforge.net/,, the CC Mode site}.},
1285which handles things like bulleted lists nicely. There's a convenience 1286which handles things like bulleted lists nicely. There's a convenience
1286function @code{c-setup-filladapt} that tunes the relevant variables in 1287function @code{c-setup-filladapt} that tunes the relevant variables in
1287Filladapt for use in @ccmode{}. Call it from a mode hook, e.g. with 1288Filladapt for use in @ccmode{}. Call it from a mode hook, e.g. with
@@ -2021,12 +2022,13 @@ this manual does not cover how that works.
2021 2022
2022Variables set like this at the top level in @file{.emacs} take effect in 2023Variables set like this at the top level in @file{.emacs} take effect in
2023all @ccmode{} buffers, regardless of language. The indentation style 2024all @ccmode{} buffers, regardless of language. The indentation style
2024related variables that you don't set get their value from the style 2025related variables, e.g. @code{c-basic-offset}, that you don't set this
2025system (@pxref{Styles}), and they therefore depend on the setting of 2026way get their value from the style system (@pxref{Styles}), and they
2026@code{c-default-style}. Note that if you use Customize, this means that 2027therefore depend on the setting of @code{c-default-style}. Note that if
2027the greyed-out default values presented there might not be the ones you 2028you use Customize, this means that the greyed-out default values
2028actually get, since the actual values depend on the style, which may 2029presented there might not be the ones you actually get, since the actual
2029very well be different for different languages. 2030values depend on the style, which may very well be different for
2031different languages.
2030 2032
2031If you want to make more advanced configurations, e.g. language-specific 2033If you want to make more advanced configurations, e.g. language-specific
2032customization, global variable settings isn't enough. For that you can 2034customization, global variable settings isn't enough. For that you can
@@ -3455,46 +3457,52 @@ The lines to note in this example include:
3455 3457
3456@cindex func-decl-cont syntactic symbol 3458@cindex func-decl-cont syntactic symbol
3457@item 3459@item
3458line 2, assigned the @code{func-decl-cont} syntax; 3460Line 2 is assigned the @code{func-decl-cont} syntax.
3459 3461
3460@cindex comment-intro syntactic symbol 3462@cindex comment-intro syntactic symbol
3461@item 3463@item
3462line 4, assigned both @code{defun-block-intro} @emph{and} 3464Line 4 is assigned both @code{defun-block-intro} @emph{and}
3463@code{comment-intro} syntax; 3465@code{comment-intro} syntax.
3464 3466
3465@cindex c syntactic symbol 3467@cindex c syntactic symbol
3466@item 3468@item
3467line 5, assigned @code{c} syntax; 3469Line 5 is assigned @code{c} syntax.
3468 3470
3469@item 3471@item
3470@cindex syntactic whitespace 3472@cindex syntactic whitespace
3471line 6 which, even though it contains nothing but whitespace, is 3473Line 6 which, even though it contains nothing but whitespace, is
3472assigned @code{defun-block-intro}. Note that the appearance of the 3474assigned @code{defun-block-intro}. Note that the appearance of the
3473comment on lines 4 and 5 do not cause line 6 to be assigned 3475comment on lines 4 and 5 do not cause line 6 to be assigned
3474@code{statement} syntax because comments are considered to be 3476@code{statement} syntax because comments are considered to be
3475@dfn{syntactic whitespace}, which are ignored when analyzing 3477@dfn{syntactic whitespace}, which are ignored when analyzing
3476code; 3478code.
3477 3479
3478@cindex string syntactic symbol 3480@cindex string syntactic symbol
3479@item 3481@item
3480line 8, assigned @code{string} syntax; 3482Line 8 is assigned @code{string} syntax.
3481 3483
3482@cindex label syntactic symbol 3484@cindex label syntactic symbol
3483@item 3485@item
3484line 10, assigned @code{label} syntax; 3486Line 10 is assigned @code{label} syntax.
3485 3487
3486@cindex block-open syntactic symbol 3488@cindex block-open syntactic symbol
3487@item 3489@item
3488line 11, assigned @code{block-open} syntax; 3490Line 11 is assigned @code{block-open} syntax.
3489 3491
3490@cindex cpp-macro syntactic symbol 3492@cindex cpp-macro syntactic symbol
3491@cindex cpp-macro-cont syntactic symbol 3493@cindex cpp-macro-cont syntactic symbol
3492@item 3494@item
3493lines 12 and 14, assigned @code{cpp-macro} syntax. 3495Lines 12 and 14 are assigned @code{cpp-macro} syntax in addition to the
3496normal syntactic symbols (@code{statement-block-intro} and
3497@code{statement}, respectively). Normally @code{cpp-macro} is
3498configured to cancel out the normal syntactic context to make all
3499preprocessor directives stick to the first column, but that's easily
3500changed if you want preprocessor directives to be indented like the rest
3501of the code.
3494 3502
3495@cindex stream-op syntactic symbol 3503@cindex stream-op syntactic symbol
3496@item 3504@item
3497line 17, assigned @code{stream-op} syntax. 3505Line 17 is assigned @code{stream-op} syntax.
3498 3506
3499@end itemize 3507@end itemize
3500 3508
@@ -3759,10 +3767,41 @@ Line up C++ stream operators (i.e. @samp{<<} and @samp{>>}).
3759@findex c-lineup-multi-inher 3767@findex c-lineup-multi-inher
3760@findex lineup-multi-inher (c-) 3768@findex lineup-multi-inher (c-)
3761@item c-lineup-multi-inher 3769@item c-lineup-multi-inher
3762Line up the classes in C++ multiple inheritance clauses under each 3770Line up the classes in C++ multiple inheritance clauses and member
3763other. 3771initializers under each other. E.g:
3772@example
3773@group
3764 3774
3765@workswith @code{inher-cont}. 3775Foo::Foo (int a, int b):
3776 Cyphr (a),
3777 Bar (b) // c-lineup-multi-inher
3778
3779@end group
3780@end example
3781@noindent
3782and
3783@example
3784@group
3785
3786class Foo
3787 : public Cyphr,
3788 public Bar // c-lineup-multi-inher
3789
3790@end group
3791@end example
3792@noindent
3793and
3794@example
3795@group
3796
3797Foo::Foo (int a, int b)
3798 : Cyphr (a)
3799 , Bar (b) // c-lineup-multi-inher
3800
3801@end group
3802@end example
3803
3804@workswith @code{inher-cont}, @code{member-init-cont}.
3766 3805
3767@findex c-lineup-java-inher 3806@findex c-lineup-java-inher
3768@findex lineup-java-inher (c-) 3807@findex lineup-java-inher (c-)
@@ -4272,11 +4311,9 @@ of putting the @code{c-set-offset} line in your top-level
4272@file{.emacs} file, put it in your @code{c-mode-common-hook}, or 4311@file{.emacs} file, put it in your @code{c-mode-common-hook}, or
4273simply modify @code{c-offsets-alist} directly: 4312simply modify @code{c-offsets-alist} directly:
4274@example 4313@example
4275@group
4276 4314
4277(setq c-offsets-alist (cons '(substatement-open . 0) 4315(setq c-offsets-alist '((substatement-open . 0)))
4278 c-offsets-alist)) 4316
4279@end group
4280@end example 4317@end example
4281 4318
4282@sp 1 4319@sp 1
@@ -4348,7 +4385,7 @@ compatibility, etc. are all available via the Web at:
4348@example 4385@example
4349@group 4386@group
4350 4387
4351 @uref{http://www.python.org/emacs/cc-mode/} 4388 @uref{http://cc-mode.sourceforge.net/}
4352 4389
4353@end group 4390@end group
4354@end example 4391@end example
@@ -4394,8 +4431,7 @@ the individual files, including PostScript documentation.
4394 "My C Programming Style") 4431 "My C Programming Style")
4395 4432
4396;; offset customizations not in my-c-style 4433;; offset customizations not in my-c-style
4397(setq c-offsets-alist (cons '(member-init-intro . ++) 4434(setq c-offsets-alist '((member-init-intro . ++)))
4398 c-offsets-alist))
4399 4435
4400;; Customizations for all modes in CC Mode. 4436;; Customizations for all modes in CC Mode.
4401(defun my-c-mode-common-hook () 4437(defun my-c-mode-common-hook ()
@@ -4486,20 +4522,16 @@ Bug reports are now sent to the following email addresses:
4486latter is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}. You 4522latter is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}. You
4487can send other questions and suggestions (kudos? @t{;-)} to 4523can send other questions and suggestions (kudos? @t{;-)} to
4488@email{bug-cc-mode@@gnu.org}, or @email{help-gnu-emacs@@gnu.org} which is 4524@email{bug-cc-mode@@gnu.org}, or @email{help-gnu-emacs@@gnu.org} which is
4489mirrored on newsgroup @code{gnu.emacs.help}. The old contact address 4525mirrored on newsgroup @code{gnu.emacs.help}.
4490@email{cc-mode-help@@python.org} is still active, but its use is
4491discouraged.
4492 4526
4493@cindex beta testers mailing list 4527@cindex beta testers mailing list
4494@cindex announcement mailing list 4528@cindex announcement mailing list
4495If you want to get announcements of new @ccmode{} releases, send the word 4529If you want to get announcements of new @ccmode{} releases, send the
4496@emph{subscribe} in the body of a message to 4530word @emph{subscribe} in the body of a message to
4497@email{cc-mode-announce-request@@python.org}. Announcements will also 4531@email{cc-mode-announce-request@@lists.sourceforge.net}. Announcements
4498be posted to the Usenet newsgroups @code{gnu.emacs.sources}, 4532will also be posted to the Usenet newsgroups @code{gnu.emacs.sources},
4499@code{comp.emacs}, @code{comp.emacs.xemacs}, and possibly some of the 4533@code{comp.emacs}, @code{comp.emacs.xemacs}, and possibly some of the
4500language oriented newsgroups. Note that the 4534language oriented newsgroups.
4501@code{cc-mode-victims@@python.org} mailing list has been
4502decommissioned.
4503 4535
4504 4536
4505@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4537@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!