annotate lisp/cc-mode/cc-vars.el @ 181:bfd6434d15b3 r20-3b17

Import from CVS: tag r20-3b17
author cvs
date Mon, 13 Aug 2007 09:53:19 +0200
parents 6075d714658b
children e121b013d1f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
1 ;;; cc-vars.el --- user customization variables for CC Mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
2
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
3 ;; Copyright (C) 1985,87,92,93,94,95,96,97 Free Software Foundation, Inc.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
4
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
5 ;; Authors: 1992-1997 Barry A. Warsaw
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
6 ;; 1987 Dave Detlefs and Stewart Clamen
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
7 ;; 1985 Richard M. Stallman
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
8 ;; Maintainer: cc-mode-help@python.org
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
9 ;; Created: 22-Apr-1997 (split from cc-mode.el)
181
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
10 ;; Version: 5.15
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
11 ;; Keywords: c languages oop
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
12
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
13 ;; This file is part of GNU Emacs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
14
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
15 ;; GNU Emacs is free software; you can redistribute it and/or modify
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
16 ;; it under the terms of the GNU General Public License as published by
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
17 ;; the Free Software Foundation; either version 2, or (at your option)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
18 ;; any later version.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
19
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
20 ;; GNU Emacs is distributed in the hope that it will be useful,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
23 ;; GNU General Public License for more details.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
24
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
25 ;; You should have received a copy of the GNU General Public License
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
26 ;; along with GNU Emacs; see the file COPYING. If not, write to the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
27 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
28 ;; Boston, MA 02111-1307, USA.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
29
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
30 (require 'custom)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
31
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
32
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
33 (defcustom c-strict-syntax-p nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
34 "*If non-nil, all syntactic symbols must be found in `c-offsets-alist'.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
35 If the syntactic symbol for a particular line does not match a symbol
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
36 in the offsets alist, an error is generated, otherwise no error is
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
37 reported and the syntactic symbol is ignored."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
38 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
39 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
40
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
41 (defcustom c-echo-syntactic-information-p nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
42 "*If non-nil, syntactic info is echoed when the line is indented."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
43 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
44 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
45
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
46 (defcustom c-basic-offset 4
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
47 "*Amount of basic offset used by + and - symbols in `c-offsets-alist'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
48 :type 'integer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
49 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
50
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
51 (defcustom c-tab-always-indent t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
52 "*Controls the operation of the TAB key.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
53 If t, hitting TAB always just indents the current line. If nil,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
54 hitting TAB indents the current line if point is at the left margin or
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
55 in the line's indentation, otherwise it insert a `real' tab character
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
56 \(see note\). If other than nil or t, then tab is inserted only
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
57 within literals -- defined as comments and strings -- and inside
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
58 preprocessor directives, but line is always reindented.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
59
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
60 Note: The value of `indent-tabs-mode' will determine whether a real
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
61 tab character will be inserted, or the equivalent number of space.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
62 When inserting a tab, actually the function stored in the variable
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
63 `c-insert-tab-function' is called.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
64
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
65 Note: indentation of lines containing only comments is also controlled
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
66 by the `c-comment-only-line-offset' variable."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
67 :type '(radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
68 :extra-offset 8
171
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
69 :format "%{C Tab Always Indent%}:\n The TAB key:\n%v"
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
70 (const :tag "always indents, never inserts TAB" t)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
71 (const :tag "indents in left margin, otherwise inserts TAB" nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
72 (const :tag "inserts TAB in literals, otherwise indent" other))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
73 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
74
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
75 (defcustom c-insert-tab-function 'insert-tab
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
76 "*Function used when inserting a tab for \\[TAB].
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
77 Only used when `c-tab-always-indent' indicates a `real' tab character
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
78 should be inserted. Value must be a function taking no arguments."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
79 :type 'function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
80 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
81
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
82 (defcustom c-comment-only-line-offset 0
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
83 "*Extra offset for line which contains only the start of a comment.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
84 Can contain an integer or a cons cell of the form:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
85
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
86 (NON-ANCHORED-OFFSET . ANCHORED-OFFSET)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
87
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
88 Where NON-ANCHORED-OFFSET is the amount of offset given to
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
89 non-column-zero anchored comment-only lines, and ANCHORED-OFFSET is
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
90 the amount of offset to give column-zero anchored comment-only lines.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
91 Just an integer as value is equivalent to (<val> . -1000)."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
92 :type '(choice (integer :tag "Non-anchored offset")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
93 (cons :tag "Non-anchored & anchored offset"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
94 :value (0 . 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
95 :extra-offset 8
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
96 (integer :tag "Non-anchored offset")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
97 (integer :tag "Anchored offset")))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
98 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
99
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
100 (defcustom c-indent-comments-syntactically-p nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
101 "*Specifies how comment-only lines should be indented.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
102 When this variable is non-nil, comment-only lines are indented
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
103 according to syntactic analysis via `c-offsets-alist', even when
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
104 \\[indent-for-comment] is used."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
105 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
106 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
107
181
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
108 (defcustom c-comment-continuation-stars "* "
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
109 "*Specifies the leader of continued block comments.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
110 You should set this variable to the literal string that gets inserted
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
111 at the front of continued block style comment lines. This should
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
112 either be the empty string, or some number of stars followed by a
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
113 single space. Note that for line style comments, this variable is not
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
114 used."
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
115 :type '(choice (const :tag "Use old semantics" nil)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
116 string)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
117 :group 'c)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
118
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
119 (defcustom c-cleanup-list '(scope-operator)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
120 "*List of various C/C++/ObjC constructs to \"clean up\".
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
121 These clean ups only take place when the auto-newline feature is
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
122 turned on, as evidenced by the `/a' or `/ah' appearing next to the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
123 mode name. Valid symbols are:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
124
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
125 brace-else-brace -- cleans up `} else {' constructs by placing entire
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
126 construct on a single line. This clean up
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
127 only takes place when there is nothing but
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
128 white space between the braces and the `else'.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
129 Clean up occurs when the open-brace after the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
130 `else' is typed.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
131 brace-elseif-brace -- similar to brace-else-brace, but cleans up
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
132 `} else if {' constructs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
133 empty-defun-braces -- cleans up empty defun braces by placing the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
134 braces on the same line. Clean up occurs when
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
135 the defun closing brace is typed.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
136 defun-close-semi -- cleans up the terminating semi-colon on defuns
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
137 by placing the semi-colon on the same line as
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
138 the closing brace. Clean up occurs when the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
139 semi-colon is typed.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
140 list-close-comma -- cleans up commas following braces in array
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
141 and aggregate initializers. Clean up occurs
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
142 when the comma is typed.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
143 scope-operator -- cleans up double colons which may designate
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
144 a C++ scope operator split across multiple
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
145 lines. Note that certain C++ constructs can
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
146 generate ambiguous situations. This clean up
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
147 only takes place when there is nothing but
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
148 whitespace between colons. Clean up occurs
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
149 when the second colon is typed."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
150 :type '(set
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
151 :extra-offset 8
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
152 (const :tag "Put `} else {' on one line" brace-else-brace)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
153 (const :tag "Put `} else if {' on one line" brace-elseif-brace)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
154 (const :tag "Put empty defun braces on one line" empty-defun-braces)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
155 (const :tag "Put `},' in aggregates on one line" list-close-comma)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
156 (const :tag "Put C++ style `::' on one line" scope-operator))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
157 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
158
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
159 (defcustom c-hanging-braces-alist '((brace-list-open)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
160 (substatement-open after)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
161 (block-close . c-snug-do-while)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
162 (extern-lang-open after)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
163 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
164 "*Controls the insertion of newlines before and after braces.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
165 This variable contains an association list with elements of the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
166 following form: (SYNTACTIC-SYMBOL . ACTION).
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
167
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
168 When a brace (either opening or closing) is inserted, the syntactic
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
169 context it defines is looked up in this list, and if found, the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
170 associated ACTION is used to determine where newlines are inserted.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
171 If the context is not found, the default is to insert a newline both
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
172 before and after the brace.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
173
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
174 SYNTACTIC-SYMBOL can be any of: defun-open, defun-close, class-open,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
175 class-close, inline-open, inline-close, block-open, block-close,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
176 substatement-open, statement-case-open, extern-lang-open,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
177 extern-lang-close, brace-list-open, brace-list-close,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
178 brace-list-intro, or brace-list-entry. See `c-offsets-alist' for
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
179 details.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
180
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
181 ACTION can be either a function symbol or a list containing any
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
182 combination of the symbols `before' or `after'. If the list is empty,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
183 no newlines are inserted either before or after the brace.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
184
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
185 When ACTION is a function symbol, the function is called with a two
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
186 arguments: the syntactic symbol for the brace and the buffer position
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
187 at which the brace was inserted. The function must return a list as
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
188 described in the preceding paragraph. Note that during the call to
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
189 the function, the variable `c-syntactic-context' is set to the entire
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
190 syntactic context for the brace line."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
191 :type '(repeat
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
192 (cons :format "%v"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
193 (choice :tag "Syntax"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
194 (const defun-open) (const defun-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
195 (const class-open) (const class-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
196 (const inline-open) (const inline-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
197 (const block-open) (const block-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
198 (const substatement-open) (const statement-case-open)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
199 (const extern-lang-open) (const extern-lang-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
200 (const brace-list-open) (const brace-list-close)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
201 (const brace-list-intro) (const brace-list-entry))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
202 (choice :tag "Action"
171
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
203 (set :format "Insert a newline %v"
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
204 :extra-offset 38
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
205 (const :tag "before brace" before)
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
206 (const :tag "after brace" after))
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 165
diff changeset
207 (function :format "Run function %v" :value c-)
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
208 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
209 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
210
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
211 (defcustom c-hanging-colons-alist nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
212 "*Controls the insertion of newlines before and after certain colons.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
213 This variable contains an association list with elements of the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
214 following form: (SYNTACTIC-SYMBOL . ACTION).
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
215
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
216 SYNTACTIC-SYMBOL can be any of: case-label, label, access-label,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
217 member-init-intro, or inher-intro.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
218
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
219 See the variable `c-hanging-braces-alist' for the semantics of this
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
220 variable. Note however that making ACTION a function symbol is
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
221 currently not supported for this variable."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
222 :type '(repeat
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
223 (cons :format "%v"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
224 (choice :tag "Syntax"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
225 (const case-label) (const label) (const access-label)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
226 (const member-init-intro) (const inher-intro))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
227 (set :tag "Action"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
228 :format "%t: %v"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
229 :extra-offset 8
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
230 (const before) (const after))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
231 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
232
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
233 (defcustom c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
234 "*List of functions that decide whether to insert a newline or not.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
235 The functions in this list are called, in order, whenever the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
236 auto-newline minor mode is activated (as evidenced by a `/a' or `/ah'
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
237 string in the mode line), and a semicolon or comma is typed (see
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
238 `c-electric-semi&comma'). Each function in this list is called with
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
239 no arguments, and should return one of the following values:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
240
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
241 nil -- no determination made, continue checking
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
242 'stop -- do not insert a newline, and stop checking
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
243 (anything else) -- insert a newline, and stop checking
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
244
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
245 If every function in the list is called with no determination made,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
246 then no newline is inserted."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
247 :type '(repeat function)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
248 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
249
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
250 (defcustom c-hanging-comment-ender-p t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
251 "*Controls what \\[fill-paragraph] does to C block comment enders.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
252 When set to nil, C block comment enders are left on their own line.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
253 When set to t, block comment enders will be placed at the end of the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
254 previous line (i.e. they `hang' on that line)."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
255 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
256 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
257
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
258 (defcustom c-hanging-comment-starter-p t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
259 "*Controls what \\[fill-paragraph] does to C block comment starters.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
260 When set to nil, C block comment starters are left on their own line.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
261 When set to t, text that follows a block comment starter will be
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
262 placed on the same line as the block comment starter (i.e. the text
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
263 `hangs' on that line)."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
264 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
265 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
266
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
267 (defcustom c-backslash-column 48
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
268 "*Column to insert backslashes when macroizing a region."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
269 :type 'integer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
270 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
271
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
272 (defcustom c-special-indent-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
273 "*Hook for user defined special indentation adjustments.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
274 This hook gets called after a line is indented by the mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
275 :type 'hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
276 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
277
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
278 (defcustom c-backspace-function 'backward-delete-char-untabify
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
279 "*Function called by `c-electric-backspace' when deleting backwards."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
280 :type 'function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
281 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
282
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
283 (defcustom c-delete-function 'delete-char
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
284 "*Function called by `c-electric-delete' when deleting forwards."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
285 :type 'function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
286 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
287
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
288 (defcustom c-electric-pound-behavior nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
289 "*List of behaviors for electric pound insertion.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
290 Only currently supported behavior is `alignleft'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
291 :type '(set :extra-offset 8 (const alignleft))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
292 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
293
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
294 (defcustom c-label-minimum-indentation 1
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
295 "*Minimum indentation for lines inside of top-level constructs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
296 This variable typically only affects code using the `gnu' style, which
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
297 mandates a minimum of one space in front of every line inside
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
298 top-level constructs. Specifically, the function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
299 `c-gnu-impose-minimum' on your `c-special-indent-hook' is what
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
300 enforces this."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
301 :type 'integer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
302 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
303
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
304 (defcustom c-progress-interval 5
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
305 "*Interval used to update progress status during long re-indentation.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
306 If a number, percentage complete gets updated after each interval of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
307 that many seconds. Set to nil to inhibit updating. This is only
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
308 useful for Emacs 19."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
309 :type 'integer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
310 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
311
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
312 (defcustom c-site-default-style "gnu"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
313 "Default style for your site.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
314 To change the default style at your site, you can set this variable to
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
315 any style defined in `c-style-alist'. However, if CC Mode is usually
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
316 loaded into your Emacs at compile time, you will need to set this
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
317 variable in the `site-init.el' file before CC Mode is loaded, then
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
318 re-dump Emacs."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
319 :type 'string
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
320 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
321
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
322 (defcustom c-style-variables-are-local-p nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
323 "*Whether style variables should be buffer local by default.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
324 If non-nil, then all indentation style related variables will be made
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
325 buffer local by default. If nil, they will remain global. Variables
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
326 are made buffer local when this file is loaded, and once buffer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
327 localized, they cannot be made global again.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
328
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
329 The list of variables to buffer localize are:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
330 c-offsets-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
331 c-basic-offset
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
332 c-file-style
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
333 c-file-offsets
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
334 c-comment-only-line-offset
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
335 c-cleanup-list
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
336 c-hanging-braces-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
337 c-hanging-colons-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
338 c-hanging-comment-starter-p
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
339 c-hanging-comment-ender-p
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
340 c-backslash-column
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
341 c-label-minimum-indentation
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
342 c-special-indent-hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
343 c-indentation-style"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
344 :type 'boolean
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
345 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
346
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
347 (defcustom c-mode-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
348 "*Hook called by `c-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
349 :type '(hook :format "%{C Mode Hook%}:\n%v")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
350 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
351
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
352 (defcustom c++-mode-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
353 "*Hook called by `c++-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
354 :type 'hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
355 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
356
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
357 (defcustom objc-mode-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
358 "*Hook called by `objc-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
359 :type 'hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
360 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
361
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
362 (defcustom java-mode-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
363 "*Hook called by `java-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
364 :type 'hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
365 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
366
177
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
367 (defcustom idl-mode-hook nil
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
368 "*Hook called by `idl-mode'."
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
369 :type 'hook
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
370 :group 'c)
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
371
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
372 (defcustom c-mode-common-hook nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
373 "*Hook called by all CC Mode modes for common initializations."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
374 :type '(hook :format "%{CC Mode Common Hook%}:\n%v")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
375 :group 'c)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
376
177
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
377 (defcustom c-initialization-hook nil
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
378 "*Hook called when the CC Mode package gets initialized.
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
379 This hook is only run once per Emacs session and can be used as a
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
380 `load-hook' or in place of using `eval-after-load'."
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
381 :type 'hook
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
382 :group 'c)
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 175
diff changeset
383
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
384
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
385
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
386 ;; Non-customizable variables, still part of the interface to CC Mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
387 (defvar c-file-style nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
388 "Variable interface for setting style via File Local Variables.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
389 In a file's Local Variable section, you can set this variable to a
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
390 string suitable for `c-set-style'. When the file is visited, CC Mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
391 will set the style of the file to this value automatically.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
392
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
393 Note that file style settings are applied before file offset settings
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
394 as designated in the variable `c-file-offsets'.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
395
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
396 (defvar c-file-offsets nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
397 "Variable interface for setting offsets via File Local Variables.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
398 In a file's Local Variable section, you can set this variable to an
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
399 association list similar to the values allowed in `c-offsets-alist'.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
400 When the file is visited, CC Mode will institute these offset settings
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
401 automatically.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
402
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
403 Note that file offset settings are applied after file style settings
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
404 as designated in the variable `c-file-style'.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
405
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
406 (defvar c-syntactic-context nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
407 "Variable containing syntactic analysis list during indentation.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
408
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
409 (defvar c-indentation-style c-site-default-style
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
410 "Name of style installed in the current buffer.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
411
181
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
412 (defvar c-buffer-is-cc-mode nil
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
413 "Non-nil for all buffers with a `major-mode' derived from CC Mode.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
414 Otherwise, this variable is nil. I.e. this variable is non-nil for
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
415 `c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode', and any
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
416 other non-CC Mode mode that calls `c-initialize-cc-mode'
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
417 \(e.g. `awk-mode').")
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
418 (make-variable-buffer-local 'c-buffer-is-cc-mode)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
419
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
420
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
421 (provide 'cc-vars)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
422 ;;; cc-vars.el ends here