annotate lisp/progmodes/cc-vars.el @ 110410:f2e111723c3a

Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sat, 18 Sep 2010 10:02:19 +0000
parents 280c8ae2476d
children 417b1e4d63cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; cc-vars.el --- user customization variables for CC Mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
74372
cf3e4c6cd4c3 Fix Copyright format.
Glenn Morris <rgm@gnu.org>
parents: 74205
diff changeset
3 ;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 104693
diff changeset
4 ;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 75307
diff changeset
5 ;; Free Software Foundation, Inc.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
75307
4389f67a231f Add my name.
Alan Mackenzie <acm@muc.de>
parents: 75027
diff changeset
7 ;; Authors: 2002- Alan Mackenzie
4389f67a231f Add my name.
Alan Mackenzie <acm@muc.de>
parents: 75027
diff changeset
8 ;; 1998- Martin Stjernholm
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
9 ;; 1992-1999 Barry A. Warsaw
101112
0685234e527d Comment (minor header format fixes).
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
10 ;; 1987 Dave Detlefs
0685234e527d Comment (minor header format fixes).
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
11 ;; 1987 Stewart Clamen
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; 1985 Richard M. Stallman
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
13 ;; Maintainer: bug-cc-mode@gnu.org
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; Created: 22-Apr-1997 (split from cc-mode.el)
110015
280c8ae2476d Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents: 109599
diff changeset
15 ;; Keywords: c languages
280c8ae2476d Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents: 109599
diff changeset
16 ;; Package: cc-mode
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; This file is part of GNU Emacs.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
20 ;; GNU Emacs is free software: you can redistribute it and/or modify
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; it under the terms of the GNU General Public License as published by
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
22 ;; the Free Software Foundation, either version 3 of the License, or
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
23 ;; (at your option) any later version.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;; GNU Emacs is distributed in the hope that it will be useful,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; GNU General Public License for more details.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;; You should have received a copy of the GNU General Public License
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
31 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32
38422
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 36920
diff changeset
33 ;;; Commentary:
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 36920
diff changeset
34
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 36920
diff changeset
35 ;;; Code:
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 36920
diff changeset
36
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
37 (eval-when-compile
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
38 (let ((load-path
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
39 (if (and (boundp 'byte-compile-dest-file)
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
40 (stringp byte-compile-dest-file))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
41 (cons (file-name-directory byte-compile-dest-file) load-path)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
42 load-path)))
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
43 (load "cc-bytecomp" nil t)))
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
44
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
45 (cc-require 'cc-defs)
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
46
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
47 ;; Silence the compiler.
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
48 (cc-bytecomp-defun get-char-table) ; XEmacs
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
49
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
50 (cc-eval-when-compile
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
51 (require 'custom)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
52 (require 'widget))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
54 (cc-eval-when-compile
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
55 ;; Need the function form of `backquote', which isn't standardized
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
56 ;; between Emacsen. It's called `bq-process' in XEmacs, and
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
57 ;; `backquote-process' in Emacs. `backquote-process' returns a
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
58 ;; slightly more convoluted form, so let `bq-process' be the norm.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
59 (if (fboundp 'backquote-process)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
60 (cc-bytecomp-defmacro bq-process (form)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
61 `(cdr (backquote-process ,form)))))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
62
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
64 ;;; Helpers
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
66 ;; This widget exists in newer versions of the Custom library
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
67 (or (get 'other 'widget-type)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
68 (define-widget 'other 'sexp
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
69 "Matches everything, but doesn't let the user edit the value.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
70 Useful as last item in a `choice' widget."
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
71 :tag "Other"
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
72 :format "%t%n"
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
73 :value 'other))
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
74
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
75 ;; The next defun will supersede c-const-symbol.
79860
9f6170e094c3 (c-constant-symbol): Put this defun inside an eval-and-compile, so as to
Alan Mackenzie <acm@muc.de>
parents: 79841
diff changeset
76 (eval-and-compile
9f6170e094c3 (c-constant-symbol): Put this defun inside an eval-and-compile, so as to
Alan Mackenzie <acm@muc.de>
parents: 79841
diff changeset
77 (defun c-constant-symbol (sym len)
87756
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
78 "Create an uneditable symbol for customization buffers.
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
79 SYM is the name of the symbol, LEN the length of the field (in
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
80 characters) the symbol will be displayed in. LEN must be big
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
81 enough.
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
82
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
83 This returns a (const ....) structure, suitable for embedding
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
84 within a customization type."
87756
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
85 (or (symbolp sym) (error "c-constant-symbol: %s is not a symbol" sym))
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
86 (let* ((name (symbol-name sym))
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
87 (l (length name))
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
88 (disp (concat name ":" (make-string (- len l 1) ?\ ))))
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
89 `(const
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
90 :size ,len
5b0f1e2a7271 * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes
Alan Mackenzie <acm@muc.de>
parents: 87649
diff changeset
91 :format ,disp
87772
d8143a93113f (c-constant-symbol): Put this defun inside an eval-and-compile, so as to
Alan Mackenzie <acm@muc.de>
parents: 87756
diff changeset
92 :value ,sym))))
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
93
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
94 (define-widget 'c-const-symbol 'item
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
95 "An uneditable lisp symbol. This is obsolete -
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
96 use c-constant-symbol instead."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
97 :value nil
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
98 :tag "Symbol"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
99 :format "%t: %v\n%d"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
100 :match (lambda (widget value) (symbolp value))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
101 :value-to-internal
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
102 (lambda (widget value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
103 (let ((s (if (symbolp value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
104 (symbol-name value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
105 value))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
106 (l (widget-get widget :size)))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
107 (if l
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
108 (setq s (concat s (make-string (- l (length s)) ?\ ))))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
109 s))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
110 :value-to-external
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
111 (lambda (widget value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
112 (if (stringp value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
113 (intern (progn
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
114 (string-match "\\`[^ ]*" value)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
115 (match-string 0 value)))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
116 value)))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
117
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
118 (define-widget 'c-integer-or-nil 'sexp
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
119 "An integer or the value nil."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
120 :value nil
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
121 :tag "Optional integer"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
122 :match (lambda (widget value) (or (integerp value) (null value))))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
123
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
124 (define-widget 'c-symbol-list 'sexp
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
125 "A single symbol or a list of symbols."
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
126 :tag "Symbols separated by spaces"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
127 :validate 'widget-field-validate
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
128 :match
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
129 (lambda (widget value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
130 (or (symbolp value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
131 (catch 'ok
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
132 (while (listp value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
133 (unless (symbolp (car value))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
134 (throw 'ok nil))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
135 (setq value (cdr value)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
136 (null value))))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
137 :value-to-internal
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
138 (lambda (widget value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
139 (cond ((null value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
140 "")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
141 ((symbolp value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
142 (symbol-name value))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
143 ((consp value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
144 (mapconcat (lambda (symbol)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
145 (symbol-name symbol))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
146 value
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
147 " "))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
148 (t
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
149 value)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
150 :value-to-external
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
151 (lambda (widget value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
152 (if (stringp value)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
153 (let (list end)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
154 (while (string-match "\\S +" value end)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
155 (setq list (cons (intern (match-string 0 value)) list)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
156 end (match-end 0)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
157 (if (and list (not (cdr list)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
158 (car list)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
159 (nreverse list)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
160 value)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
161
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
162 (defvar c-style-variables
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
163 '(c-basic-offset c-comment-only-line-offset c-indent-comment-alist
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
164 c-indent-comments-syntactically-p c-block-comment-prefix
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
165 c-comment-prefix-regexp c-doc-comment-style c-cleanup-list
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
166 c-hanging-braces-alist c-hanging-colons-alist
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
167 c-hanging-semi&comma-criteria c-backslash-column c-backslash-max-column
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
168 c-special-indent-hook c-label-minimum-indentation c-offsets-alist)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
169 "List of the style variables.")
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
170
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
171 (defvar c-fallback-style nil)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
172
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
173 (defsubst c-set-stylevar-fallback (name val)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
174 (put name 'c-stylevar-fallback val)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
175 (setq c-fallback-style (cons (cons name val) c-fallback-style)))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
176
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
177 (defmacro defcustom-c-stylevar (name val doc &rest args)
87561
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
178 "Define a style variable NAME with VAL and DOC.
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
179 More precisely, convert the given `:type FOO', mined out of ARGS,
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
180 to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append some
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
181 some boilerplate documentation to DOC, arrange for the fallback
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
182 value of NAME to be VAL, and call `custom-declare-variable' to
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
183 do the rest of the work.
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
184
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
185 STYLE stands for the choice where the value is taken from some
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
186 style setting. PREAMBLE is optionally prepended to FOO; that is,
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
187 if FOO contains :tag or :value, the respective two-element list
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
188 component is ignored."
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
189 (declare (debug (symbolp form stringp &rest)))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
190 (let* ((expanded-doc (concat doc "
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
191
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
192 This is a style variable. Apart from the valid values described
87561
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
193 above, it can be set to the symbol `set-from-style'. In that case,
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
194 it takes its value from the style system (see `c-default-style' and
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
195 `c-style-alist') when a CC Mode buffer is initialized. Otherwise,
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
196 the value set here overrides the style system (there is a variable
87561
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
197 `c-old-style-variable-behavior' that changes this, though)."))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
198 (typ (eval (plist-get args :type)))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
199 (type (if (consp typ) typ (list typ)))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
200 (head (car type))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
201 (tail (cdr type))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
202 (newt (append (unless (plist-get tail :tag)
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
203 '(:tag "Override style settings"))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
204 (unless (plist-get tail :value)
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
205 `(:value ,(eval val)))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
206 tail))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
207 (aggregate `'(radio
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
208 (const :tag "Use style settings" set-from-style)
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
209 ,(cons head newt))))
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
210 `(progn
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
211 (c-set-stylevar-fallback ',name ,val)
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
212 (custom-declare-variable
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
213 ',name ''set-from-style
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
214 ,expanded-doc
5af270d1dbdc (defcustom-c-stylevar): Revert previous change (merge mistake).
Glenn Morris <rgm@gnu.org>
parents: 87453
diff changeset
215 ,@(plist-put args :type aggregate)))))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
216
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
217 (defun c-valid-offset (offset)
78487
419c5c316b51 Replace `iff' in doc-strings and comments.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
218 "Return non-nil if OFFSET is a valid offset for a syntactic symbol.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
219 See `c-offsets-alist'."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
220 (or (eq offset '+)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
221 (eq offset '-)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
222 (eq offset '++)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
223 (eq offset '--)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
224 (eq offset '*)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
225 (eq offset '/)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
226 (integerp offset)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
227 (functionp offset)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
228 (and (symbolp offset) (boundp offset))
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
229 (and (vectorp offset)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
230 (= (length offset) 1)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
231 (integerp (elt offset 0)))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
232 (and (consp offset)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
233 (not (eq (car offset) 'quote)) ; Detect misquoted lists.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
234 (progn
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
235 (when (memq (car offset) '(first min max add))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
236 (setq offset (cdr offset)))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
237 (while (and (consp offset)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
238 (c-valid-offset (car offset)))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
239 (setq offset (cdr offset)))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
240 (null offset)))))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
241
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
242
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
243
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
244 ;;; User variables
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
245
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
246 (defcustom c-strict-syntax-p nil
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
247 "*If non-nil, all syntactic symbols must be found in `c-offsets-alist'.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
248 If the syntactic symbol for a particular line does not match a symbol
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
249 in the offsets alist, or if no non-nil offset value can be determined
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
250 for a symbol, an error is generated, otherwise no error is reported
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
251 and the syntactic symbol is ignored.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
252
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
253 This variable is considered obsolete; it doesn't work well with lineup
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
254 functions that return nil to support the feature of using lists on
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
255 syntactic symbols in `c-offsets-alist'. Please keep it set to nil."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
256 :type 'boolean
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
257 :group 'c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
258
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
259 (defcustom c-echo-syntactic-information-p nil
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
260 "*If non-nil, syntactic info is echoed when the line is indented."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
261 :type 'boolean
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
262 :group 'c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
263
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
264 (defcustom c-report-syntactic-errors nil
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
265 "*If non-nil, certain syntactic errors are reported with a ding
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
266 and a message, for example when an \"else\" is indented for which
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
267 there's no corresponding \"if\".
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
268
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
269 Note however that CC Mode doesn't make any special effort to check for
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
270 syntactic errors; that's the job of the compiler. The reason it can
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
271 report cases like the one above is that it can't find the correct
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
272 anchoring position to indent the line in that case."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
273 :type 'boolean
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
274 :group 'c)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
275
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
276 (defcustom-c-stylevar c-basic-offset 4
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
277 "*Amount of basic offset used by + and - symbols in `c-offsets-alist'.
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
278 Also used as the indentation step when `c-syntactic-indentation' is
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
279 nil."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
280 :type 'integer
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
281 :group 'c)
70590
63b772bfba93 Move `safe-local-variable' declarations to the respective files.
Reiner Steib <Reiner.Steib@gmx.de>
parents: 69140
diff changeset
282 ;;;###autoload(put 'c-basic-offset 'safe-local-variable 'integerp)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
283
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 (defcustom c-tab-always-indent t
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 "*Controls the operation of the TAB key.
56646
b7446b6f097d Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents: 53073
diff changeset
286 If t, hitting TAB always just indents the current line. If nil, hitting
b7446b6f097d Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents: 53073
diff changeset
287 TAB indents the current line if point is at the left margin or in the
100111
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
288 line's indentation, otherwise it calls `c-insert-tab-function' to
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
289 insert a `real' tab character. If some other value (neither nil nor t),
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
290 then inserts a tab only within literals (comments and strings), but
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
291 always reindents the line.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292
100111
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
293 Note: the variable `c-comment-only-line-offset' also controls the
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
294 indentation of lines containing only comments."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295 :type '(radio
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
296 (const :tag "TAB key always indents, never inserts TAB" t)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
297 (const :tag "TAB key indents in left margin, otherwise inserts TAB" nil)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
298 (other :tag "TAB key inserts TAB in literals, otherwise indents" other))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301 (defcustom c-insert-tab-function 'insert-tab
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
302 "*Function used when inserting a tab for \\[c-indent-command].
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 Only used when `c-tab-always-indent' indicates a `real' tab character
100111
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
304 should be inserted. Value must be a function taking no arguments.
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
305 The default, `insert-tab', inserts either a tab or the equivalent
70331b8d068a (c-tab-always-indent, c-insert-tab-function): Doc fix. (Bug#1368)
Glenn Morris <rgm@gnu.org>
parents: 94673
diff changeset
306 number of spaces depending on the value of `indent-tabs-mode'."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307 :type 'function
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
310 (defcustom c-syntactic-indentation t
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
311 "*Whether the indentation should be controlled by the syntactic context.
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
312
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
313 If t, the indentation functions indent according to the syntactic
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
314 context, using the style settings specified by `c-offsets-alist'.
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
315
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
316 If nil, every line is just indented to the same level as the previous
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
317 one, and the \\[c-indent-command] command adjusts the indentation in
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
318 steps specified by `c-basic-offset'. The indentation style has no
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
319 effect in this mode, nor any of the indentation associated variables,
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
320 e.g. `c-special-indent-hook'."
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
321 :type 'boolean
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
322 :group 'c)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
323 (make-variable-buffer-local 'c-syntactic-indentation)
79885
897a4cc5c95d * progmodes/sh-script.el (sh-basic-offset):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 79860
diff changeset
324 (put 'c-syntactic-indentation 'safe-local-variable 'booleanp)
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
325
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
326 (defcustom c-syntactic-indentation-in-macros t
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
327 "*Enable syntactic analysis inside macros.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
328 If this is nil, all lines inside macro definitions are analyzed as
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
329 `cpp-macro-cont'. Otherwise they are analyzed syntactically, just
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
330 like normal code, and `cpp-define-intro' is used to create the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
331 additional indentation of the bodies of \"#define\" macros.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
332
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
333 Having this enabled simplifies editing of large multiline macros, but
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
334 it might complicate editing if CC Mode doesn't recognize the context
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
335 of the macro content. The default context inside the macro is the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
336 same as the top level, so if it contains \"bare\" statements they
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
337 might be indented wrongly, although there are special cases that
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
338 handle this in most cases. If this problem occurs, it's usually
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
339 countered easily by surrounding the statements by a block \(or even
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
340 better with the \"do { ... } while \(0)\" trick)."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
341 :type 'boolean
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
342 :group 'c)
79885
897a4cc5c95d * progmodes/sh-script.el (sh-basic-offset):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 79860
diff changeset
343 (put 'c-syntactic-indentation-in-macros 'safe-local-variable 'booleanp)
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
344
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
345 (defcustom-c-stylevar c-comment-only-line-offset 0
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 "*Extra offset for line which contains only the start of a comment.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 Can contain an integer or a cons cell of the form:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 (NON-ANCHORED-OFFSET . ANCHORED-OFFSET)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 Where NON-ANCHORED-OFFSET is the amount of offset given to
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 non-column-zero anchored comment-only lines, and ANCHORED-OFFSET is
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 the amount of offset to give column-zero anchored comment-only lines.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
354 Just an integer as value is equivalent to (<val> . -1000).
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
355
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
356 Note that this variable only has effect when the `c-lineup-comment'
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
357 lineup function is used on the `comment-intro' syntactic symbol (the
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
358 default)."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
359 :type '(choice (integer :tag "Non-anchored offset" 0)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360 (cons :tag "Non-anchored & anchored offset"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 :value (0 . 0)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 (integer :tag "Non-anchored offset")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363 (integer :tag "Anchored offset")))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
366 (defcustom-c-stylevar c-indent-comment-alist
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
367 '((anchored-comment . (column . 0))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
368 (end-block . (space . 1))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
369 (cpp-end-block . (space . 2)))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
370 "*Specifies how \\[indent-for-comment] calculates the comment start column.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
371 This is an association list that contains entries of the form:
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
372
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
373 (LINE-TYPE . INDENT-SPEC)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
374
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
375 LINE-TYPE specifies a type of line as described below, and INDENT-SPEC
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
376 says what \\[indent-for-comment] should do when used on that type of line.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
377
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
378 The recognized values for LINE-TYPE are:
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
379
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
380 empty-line -- The line is empty.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
381 anchored-comment -- The line contains a comment that starts in column 0.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
382 end-block -- The line contains a solitary block closing brace.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
383 cpp-end-block -- The line contains a preprocessor directive that
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
384 closes a block, i.e. either \"#endif\" or \"#else\".
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
385 other -- The line does not match any other entry
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
386 currently on the list.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
387
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
388 An INDENT-SPEC is a cons cell of the form:
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
389
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
390 (ACTION . VALUE)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
391
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
392 ACTION says how \\[indent-for-comment] should align the comment, and
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
393 VALUE is interpreted depending on ACTION. ACTION can be any of the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
394 following:
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
395
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
396 space -- Put VALUE spaces between the end of the line and the start
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
397 of the comment.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
398 column -- Start the comment at the column VALUE. If the line is
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
399 longer than that, the comment is preceded by a single
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
400 space. If VALUE is nil, `comment-column' is used.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
401 align -- Align the comment with one on the previous line, if there
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
402 is any. If the line is too long, the comment is preceded
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
403 by a single space. If there isn't a comment start on the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
404 previous line, the behavior is specified by VALUE, which
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
405 in turn is interpreted as an INDENT-SPEC.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
406
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
407 If a LINE-TYPE is missing, then \\[indent-for-comment] indents the comment
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
408 according to `comment-column'.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
409
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
410 Note that a non-nil value on `c-indent-comments-syntactically-p'
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
411 overrides this variable, so empty lines are indentented syntactically
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
412 in that case, i.e. as if \\[c-indent-command] was used instead."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
413 :type
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
414 (let ((space '(cons :tag "space"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
415 :format "%v"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
416 :value (space . 1)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
417 (const :format "space " space)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
418 (integer :format "%v")))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
419 (column '(cons :tag "column"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
420 :format "%v"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
421 (const :format "column " column)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
422 (c-integer-or-nil :format "%v"))))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
423 `(set ,@(mapcar
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
424 (lambda (elt)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
425 `(cons :format "%v"
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
426 ,(c-constant-symbol elt 20)
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
427 (choice
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
428 :format "%[Choice%] %v"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
429 :value (column . nil)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
430 ,space
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
431 ,column
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
432 (cons :tag "align"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
433 :format "%v"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
434 (const :format "align " align)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
435 (choice
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
436 :format "%[Choice%] %v"
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
437 :value (column . nil)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
438 ,space
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
439 ,column)))))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
440 '(empty-line anchored-comment end-block cpp-end-block other))))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
441 :group 'c)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
442
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
443 (defcustom-c-stylevar c-indent-comments-syntactically-p nil
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
444 "*Specifies how \\[indent-for-comment] should handle comment-only lines.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
445 When this variable is non-nil, comment-only lines are indented
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
446 according to syntactic analysis via `c-offsets-alist'. Otherwise, the
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
447 comment is indented as if it was preceded by code. Note that this
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
448 variable does not affect how the normal line indentation treats
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
449 comment-only lines."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
450 :type 'boolean
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
451 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
452
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
453 (make-obsolete-variable 'c-comment-continuation-stars
104693
eee42a220506 * progmodes/cc-vars.el (c-comment-continuation-stars):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 103117
diff changeset
454 'c-block-comment-prefix "21.1")
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
455
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
456 ;; Although c-comment-continuation-stars is obsolete, we look at it in
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
457 ;; some places in CC Mode anyway, so make the compiler ignore it
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
458 ;; during our compilation.
87320
80e1a8076c36 * progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 79580
diff changeset
459 ;; [This is unclean; better to use `symbol-value'. --ttn]
80e1a8076c36 * progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 79580
diff changeset
460 ;;(cc-bytecomp-obsolete-var c-comment-continuation-stars)
80e1a8076c36 * progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 79580
diff changeset
461 ;;(cc-bytecomp-defvar c-comment-continuation-stars)
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
462
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
463 (defcustom-c-stylevar c-block-comment-prefix
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
464 (if (boundp 'c-comment-continuation-stars)
87320
80e1a8076c36 * progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 79580
diff changeset
465 (symbol-value 'c-comment-continuation-stars)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
466 "* ")
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
467 "*Specifies the line prefix of continued C-style block comments.
19298
4a99e63dc4a9 (c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 19255
diff changeset
468 You should set this variable to the literal string that gets inserted
4a99e63dc4a9 (c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 19255
diff changeset
469 at the front of continued block style comment lines. This should
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
470 either be the empty string, or some characters without preceding
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
471 spaces. To adjust the alignment under the comment starter, put an
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
472 appropriate value on the `c' syntactic symbol (see the
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
473 `c-offsets-alist' variable).
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
474
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
475 It's only used when a one-line block comment is broken into two or
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
476 more lines for the first time; otherwise the appropriate prefix is
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
477 adapted from the comment. This variable is not used for C++ line
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
478 style comments."
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
479 :type 'string
19298
4a99e63dc4a9 (c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 19255
diff changeset
480 :group 'c)
4a99e63dc4a9 (c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 19255
diff changeset
481
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
482 (defcustom-c-stylevar c-comment-prefix-regexp
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
483 '((pike-mode . "//+!?\\|\\**")
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
484 (awk-mode . "#+")
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
485 (other . "//+\\|\\**"))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
486 "*Regexp to match the line prefix inside comments.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
487 This regexp is used to recognize the fill prefix inside comments for
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
488 correct paragraph filling and other things.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
489
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
490 If this variable is a string, it will be used in all CC Mode major
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
491 modes. It can also be an association list, to associate specific
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
492 regexps to specific major modes. The symbol for the major mode is
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
493 looked up in the association list, and its value is used as the line
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
494 prefix regexp. If it's not found, then the symbol `other' is looked
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
495 up and its value is used instead.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
496
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
497 The regexp should match the prefix used in both C++ style line
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
498 comments and C style block comments, but it does not need to match a
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
499 block comment starter. In other words, it should at least match
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
500 \"//\" for line comments and the string in `c-block-comment-prefix',
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
501 which is sometimes inserted by CC Mode inside block comments. It
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
502 should not match any surrounding whitespace.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
503
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
504 Note that CC Mode uses this variable to set many other variables that
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
505 handle the paragraph filling. That's done at mode initialization or
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
506 when you switch to a style which sets this variable. Thus, if you
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
507 change it in some other way, e.g. interactively in a CC Mode buffer,
52609
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
508 you will need to do \\[c-setup-paragraph-variables] afterwards so that
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
509 the other variables are updated with the new value.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
510
52609
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
511 Note also that when CC Mode starts up, all variables are initialized
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
512 before the mode hooks are run. It's therefore necessary to make a
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
513 call to `c-setup-paragraph-variables' explicitly if you change this
ce6cc36ebb7c (c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents: 52401
diff changeset
514 variable in a mode hook."
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
515 :type '(radio
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
516 (regexp :tag "Regexp for all modes")
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
517 (list
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
518 :tag "Mode-specific regexps"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
519 (set
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
520 :inline t :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
521 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
522 (const :format "C " c-mode) (regexp :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
523 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
524 (const :format "C++ " c++-mode) (regexp :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
525 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
526 (const :format "ObjC " objc-mode) (regexp :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
527 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
528 (const :format "Java " java-mode) (regexp :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
529 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
530 (const :format "IDL " idl-mode) (regexp :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
531 (cons :format "%v"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
532 (const :format "Pike " pike-mode) (regexp :format "%v"))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
533 (cons :format "%v"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
534 (const :format "AWK " awk-mode) (regexp :format "%v")))
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
535 (cons :format " %v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
536 (const :format "Other " other) (regexp :format "%v"))))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
537 :group 'c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
538
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
539 (defcustom-c-stylevar c-doc-comment-style
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
540 '((java-mode . javadoc)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
541 (pike-mode . autodoc)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
542 (c-mode . gtkdoc))
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
543 "*Specifies documentation comment style(s) to recognize.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
544 This is primarily used to fontify doc comments and the markup within
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
545 them, e.g. Javadoc comments.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
546
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
547 The value can be any of the following symbols for various known doc
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
548 comment styles:
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
549
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
550 javadoc -- Javadoc style for \"/** ... */\" comments (default in Java mode).
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
551 autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode).
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
552 gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C mode).
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
553
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
554 The value may also be a list of doc comment styles, in which case all
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
555 of them are recognized simultaneously (presumably with markup cues
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
556 that don't conflict).
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
557
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
558 The value may also be an association list to specify different doc
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
559 comment styles for different languages. The symbol for the major mode
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
560 is then looked up in the alist, and the value of that element is
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
561 interpreted as above if found. If it isn't found then the symbol
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
562 `other' is looked up and its value is used instead.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
563
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
564 Note that CC Mode uses this variable to set other variables that
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
565 handle fontification etc. That's done at mode initialization or when
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
566 you switch to a style which sets this variable. Thus, if you change
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
567 it in some other way, e.g. interactively in a CC Mode buffer, you will
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
568 need to do \\[java-mode] (or whatever mode you're currently using) to
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
569 reinitialize.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
570
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
571 Note also that when CC Mode starts up, the other variables are
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
572 modified before the mode hooks are run. If you change this variable
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
573 in a mode hook, you have to call `c-setup-doc-comment-style'
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
574 afterwards to redo that work."
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
575 ;; Symbols other than those documented above may be used on this
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
576 ;; variable. If a variable exists that has that name with
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
577 ;; "-font-lock-keywords" appended, it's value is prepended to the
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
578 ;; font lock keywords list. If it's a function then it's called and
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
579 ;; the result is prepended.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
580 :type '(radio
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
581 (c-symbol-list :tag "Doc style(s) in all modes")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
582 (list
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
583 :tag "Mode-specific doc styles"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
584 (set
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
585 :inline t :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
586 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
587 (const :format "C " c-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
588 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
589 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
590 (const :format "C++ " c++-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
591 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
592 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
593 (const :format "ObjC " objc-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
594 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
595 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
596 (const :format "Java " java-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
597 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
598 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
599 (const :format "IDL " idl-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
600 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
601 (cons :format "%v"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
602 (const :format "Pike " pike-mode)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
603 (c-symbol-list :format "%v"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
604 (cons :format "%v"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
605 (const :format "AWK " awk-mode)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
606 (c-symbol-list :format "%v"))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
607 (cons :format "%v"
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
608 (const :format "Other " other)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
609 (c-symbol-list :format "%v")))))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
610 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
611
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
612 (defcustom c-ignore-auto-fill '(string cpp code)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
613 "*List of contexts in which automatic filling never occurs.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
614 If Auto Fill mode is active, it will be temporarily disabled if point
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
615 is in any context on this list. It's e.g. useful to enable Auto Fill
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
616 in comments only, but not in strings or normal code. The valid
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
617 contexts are:
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
618
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
619 string -- inside a string or character literal
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
620 c -- inside a C style block comment
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
621 c++ -- inside a C++ style line comment
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
622 cpp -- inside a preprocessor directive
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
623 code -- anywhere else, i.e. in normal code"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
624 :type '(set
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
625 (const :tag "String literals" string)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
626 (const :tag "C style block comments" c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
627 (const :tag "C++ style line comments" c++)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
628 (const :tag "Preprocessor directives" cpp)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
629 (const :tag "Normal code" code))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
630 :group 'c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
631
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
632 (defcustom-c-stylevar c-cleanup-list '(scope-operator)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
633 "*List of various C/C++/ObjC constructs to \"clean up\".
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
634 The following clean ups only take place when the auto-newline feature
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
635 is turned on, as evidenced by the `/la' appearing next to the mode
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
636 name:
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
638 brace-else-brace -- Clean up \"} else {\" constructs by placing
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
639 entire construct on a single line. This clean
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
640 up only takes place when there is nothing but
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641 white space between the braces and the `else'.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
642 Clean up occurs when the open brace after the
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 `else' is typed.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
644 brace-elseif-brace -- Similar to brace-else-brace, but clean up
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
645 \"} else if (...) {\" constructs. Clean up
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
646 occurs after the open parenthesis and the open
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
647 brace.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
648 brace-catch-brace -- Similar to brace-elseif-brace, but clean up
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
649 \"} catch (...) {\" constructs.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
650 empty-defun-braces -- Clean up empty defun braces by placing the
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
651 braces on the same line. Clean up occurs when
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
652 the defun closing brace is typed.
75027
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
653 one-liner-defun -- If the code inside a function body can fit in
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
654 a single line, then remove any newlines
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
655 between that line and the defun braces so that
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
656 the whole body becomes a single line.
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
657 `c-max-one-liner-length' gives the maximum
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
658 length allowed for the resulting line. Clean
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
659 up occurs when the closing brace is typed.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
660 defun-close-semi -- Clean up the terminating semi-colon on defuns
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
661 by placing the semi-colon on the same line as
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
662 the closing brace. Clean up occurs when the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
663 semi-colon is typed.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
664 list-close-comma -- Clean up commas following braces in array
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
665 and aggregate initializers. Clean up occurs
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
666 when the comma is typed.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
667 scope-operator -- Clean up double colons which may designate
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
668 a C++ scope operator split across multiple
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
669 lines. Note that certain C++ constructs can
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
670 generate ambiguous situations. This clean up
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
671 only takes place when there is nothing but
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
672 whitespace between colons. Clean up occurs
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
673 when the second colon is typed.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
674
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
675 The following clean ups always take place when they are on this list,
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
676 regardless of the auto-newline feature, since they typically don't
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
677 involve auto-newline inserted newlines:
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
678
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
679 space-before-funcall -- Insert exactly one space before the opening
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
680 parenthesis of a function call. Clean up
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
681 occurs when the opening parenthesis is typed.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
682 compact-empty-funcall -- Clean up any space before the function call
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
683 opening parenthesis if and only if the
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
684 argument list is empty. This is typically
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
685 useful together with `space-before-funcall' to
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
686 get the style \"foo (bar)\" and \"foo()\".
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
687 Clean up occurs when the closing parenthesis
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
688 is typed.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
689 comment-close-slash -- When a slash is typed after the comment prefix
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
690 on a bare line in a c-style comment, the comment
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
691 is closed by cleaning up preceding space and
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
692 inserting a star if needed."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
693 :type '(set
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
694 (const :tag "Put \"} else {\" on one line (brace-else-brace)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
695 brace-else-brace)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
696 (const :tag "Put \"} else if (...) {\" on one line (brace-elseif-brace)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
697 brace-elseif-brace)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
698 (const :tag "Put \"} catch (...) {\" on one line (brace-catch-brace)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
699 brace-catch-brace)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
700 (const :tag "Put empty defun braces on one line (empty-defun-braces)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
701 empty-defun-braces)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
702 (const :tag "Put short function bodies on one line (one-liner-defun)"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
703 one-liner-defun)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
704 (const :tag "Put \"};\" ending defuns on one line (defun-close-semi)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
705 defun-close-semi)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
706 (const :tag "Put \"},\" in aggregates on one line (list-close-comma)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
707 list-close-comma)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
708 (const :tag "Put C++ style \"::\" on one line (scope-operator)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
709 scope-operator)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
710 (const :tag "Put a space before funcall parens, e.g. \"foo (bar)\" (space-before-funcall)"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
711 space-before-funcall)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
712 (const :tag "Remove space before empty funcalls, e.g. \"foo()\" (compact-empty-funcall)"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
713 compact-empty-funcall)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
714 (const :tag "Make / on a bare line of a C-style comment close it (comment-close-slash)"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
715 comment-close-slash))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
718 (defcustom-c-stylevar c-hanging-braces-alist '((brace-list-open)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
719 (brace-entry-open)
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
720 (statement-cont)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
721 (substatement-open after)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
722 (block-close . c-snug-do-while)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
723 (extern-lang-open after)
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
724 (namespace-open after)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
725 (module-open after)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
726 (composition-open after)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
727 (inexpr-class-open after)
88022
a31afa284500 Introduce elements for the syntactic symbol arglist-cont-nonempty into
Alan Mackenzie <acm@muc.de>
parents: 87903
diff changeset
728 (inexpr-class-close before)
a31afa284500 Introduce elements for the syntactic symbol arglist-cont-nonempty into
Alan Mackenzie <acm@muc.de>
parents: 87903
diff changeset
729 (arglist-cont-nonempty))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
730 "*Controls the insertion of newlines before and after braces
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
731 when the auto-newline feature is active. This variable contains an
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
732 association list with elements of the following form:
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
733 \(SYNTACTIC-SYMBOL . ACTION).
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
734
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
735 When a brace (either opening or closing) is inserted, the syntactic
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
736 context it defines is looked up in this list, and if found, the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
737 associated ACTION is used to determine where newlines are inserted.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738 If the context is not found, the default is to insert a newline both
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
739 before and after the brace.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
740
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
741 SYNTACTIC-SYMBOL can be statement-cont, brace-list-intro,
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
742 inexpr-class-open, inexpr-class-close, and any of the *-open and
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
743 *-close symbols. See `c-offsets-alist' for details, except for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
744 inexpr-class-open and inexpr-class-close, which doesn't have any
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
745 corresponding symbols there. Those two symbols are used for the
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
746 opening and closing braces, respectively, of anonymous inner classes
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
747 in Java.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749 ACTION can be either a function symbol or a list containing any
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 combination of the symbols `before' or `after'. If the list is empty,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751 no newlines are inserted either before or after the brace.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753 When ACTION is a function symbol, the function is called with a two
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 arguments: the syntactic symbol for the brace and the buffer position
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
755 at which the brace was inserted. The function must return a list as
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
756 described in the preceding paragraph. Note that during the call to
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
757 the function, the variable `c-syntactic-context' is set to the entire
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 syntactic context for the brace line."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
759 :type
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
760 `(set ,@(mapcar
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
761 (lambda (elt)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
762 `(cons :format "%v"
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
763 ,(c-constant-symbol elt 24)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
764 (choice :format "%[Choice%] %v"
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
765 :value (before after)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
766 (set :menu-tag "Before/after"
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
767 :format "Newline %v brace\n"
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
768 (const :format "%v, " before)
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
769 (const :format "%v " after))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
770 (function :menu-tag "Function"
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
771 :format "Run function: %v"))))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
772 '(defun-open defun-close
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
773 class-open class-close
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
774 inline-open inline-close
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
775 block-open block-close
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
776 statement-cont substatement-open statement-case-open
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
777 brace-list-open brace-list-close
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
778 brace-list-intro brace-entry-open
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
779 extern-lang-open extern-lang-close
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
780 namespace-open namespace-close
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
781 module-open module-close
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
782 composition-open composition-close
88022
a31afa284500 Introduce elements for the syntactic symbol arglist-cont-nonempty into
Alan Mackenzie <acm@muc.de>
parents: 87903
diff changeset
783 inexpr-class-open inexpr-class-close
a31afa284500 Introduce elements for the syntactic symbol arglist-cont-nonempty into
Alan Mackenzie <acm@muc.de>
parents: 87903
diff changeset
784 arglist-cont-nonempty)))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
785 :group 'c)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
786
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
787 (defcustom c-max-one-liner-length 80
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
788 "Maximum length of line that clean-up \"one-liner-defun\" will compact to.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
789 Zero or nil means no limit."
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
790 :type 'integer
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
791 :group 'c)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
792
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
793 (defcustom-c-stylevar c-hanging-colons-alist nil
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
794 "*Controls the insertion of newlines before and after certain colons.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
795 This variable contains an association list with elements of the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
796 following form: (SYNTACTIC-SYMBOL . ACTION).
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
797
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
798 SYNTACTIC-SYMBOL can be any of: case-label, label, access-label,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
799 member-init-intro, or inher-intro.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
800
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
801 See the variable `c-hanging-braces-alist' for the semantics of this
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
802 variable. Note however that making ACTION a function symbol is
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
803 currently not supported for this variable."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
804 :type
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
805 `(set ,@(mapcar
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
806 (lambda (elt)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
807 `(cons :format "%v"
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
808 ,(c-constant-symbol elt 20)
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
809 (set :format "Newline %v colon\n"
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
810 (const :format "%v, " before)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
811 (const :format "%v" after))))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
812 '(case-label label access-label member-init-intro inher-intro)))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
813 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
814
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
815 (defcustom-c-stylevar c-hanging-semi&comma-criteria
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
816 '(c-semi&comma-inside-parenlist)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
817 "*List of functions that decide whether to insert a newline or not.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
818 The functions in this list are called, in order, whenever the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
819 auto-newline minor mode is activated (as evidenced by a `/a' or `/ah'
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
820 string in the mode line), and a semicolon or comma is typed (see
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821 `c-electric-semi&comma'). Each function in this list is called with
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822 no arguments, and should return one of the following values:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
823
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 nil -- no determination made, continue checking
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
825 'stop -- do not insert a newline, and stop checking
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
826 (anything else) -- insert a newline, and stop checking
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
828 If every function in the list is called with no determination made,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
829 then no newline is inserted."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830 :type '(repeat function)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
831 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
833 (defcustom-c-stylevar c-backslash-column 48
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
834 "*Minimum alignment column for line continuation backslashes.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
835 This is used by the functions that automatically insert or align the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
836 line continuation backslashes in multiline macros. If any line in the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
837 macro exceeds this column then the next tab stop from that line is
74205
b3f1ef7ff72f (c-backslash-column): Add . at end of sentence.
Jan Djärv <jan.h.d@swipnet.se>
parents: 74179
diff changeset
838 used as alignment column instead. See also `c-backslash-max-column'."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
839 :type 'integer
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840 :group 'c)
70773
35e35b506682 (c-backslash-column): Mark as safe if its value is an integer.
Eli Zaretskii <eliz@gnu.org>
parents: 70590
diff changeset
841 ;;;###autoload(put 'c-backslash-column 'safe-local-variable 'integerp)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
842
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
843 (defcustom-c-stylevar c-backslash-max-column 72
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
844 "*Maximum alignment column for line continuation backslashes.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
845 This is used by the functions that automatically insert or align the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
846 line continuation backslashes in multiline macros. If any line in the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
847 macro exceeds this column then the backslashes for the other lines
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
848 will be aligned at this column."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
849 :type 'integer
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
850 :group 'c)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
851
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
852 (defcustom c-auto-align-backslashes t
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
853 "*Align automatically inserted line continuation backslashes.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
854 When line continuation backslashes are inserted automatically for line
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
855 breaks in multiline macros, e.g. by \\[c-context-line-break], they are
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
856 aligned with the other backslashes in the same macro if this flag is
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
857 set. Otherwise the inserted backslashes are preceded by a single
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
858 space."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
859 :type 'boolean
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
861
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 (defcustom c-backspace-function 'backward-delete-char-untabify
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863 "*Function called by `c-electric-backspace' when deleting backwards."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 :type 'function
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867 (defcustom c-delete-function 'delete-char
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
868 "*Function called by `c-electric-delete-forward' when deleting forwards."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869 :type 'function
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
871
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
872 (defcustom c-require-final-newline
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
873 ;; C and C++ mandate that all nonempty files should end with a
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
874 ;; newline. Objective-C refers to C for all things it doesn't
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
875 ;; specify, so the same holds there. The other languages do not
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
876 ;; require it (at least not explicitly in a normative text).
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
877 '((c-mode . t)
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
878 (c++-mode . t)
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
879 (objc-mode . t))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
880 "*Controls whether a final newline is ensured when the file is saved.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
881 The value is an association list that for each language mode specifies
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
882 the value to give to `require-final-newline' at mode initialization;
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
883 see that variable for details about the value. If a language isn't
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
884 present on the association list, CC Mode won't touch
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
885 `require-final-newline' in buffers for that language."
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
886 :type `(set (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
887 (const :format "C " c-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
888 (symbol :format "%v" :value ,require-final-newline))
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
889 (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
890 (const :format "C++ " c++-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
891 (symbol :format "%v" :value ,require-final-newline))
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
892 (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
893 (const :format "ObjC " objc-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
894 (symbol :format "%v" :value ,require-final-newline))
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
895 (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
896 (const :format "Java " java-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
897 (symbol :format "%v" :value ,require-final-newline))
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
898 (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
899 (const :format "IDL " idl-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
900 (symbol :format "%v" :value ,require-final-newline))
49496
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
901 (cons :format "%v"
2c05c557df6c (c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents: 49479
diff changeset
902 (const :format "Pike " pike-mode)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
903 (symbol :format "%v" :value ,require-final-newline))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
904 (cons :format "%v"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
905 (const :format "AWK " awk-mode)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
906 (symbol :format "%v" :value ,require-final-newline)))
49470
13365bab7fce (c-require-final-newline): Added a variable to make the initialization of
Martin Stjernholm <mast@lysator.liu.se>
parents: 48656
diff changeset
907 :group 'c)
13365bab7fce (c-require-final-newline): Added a variable to make the initialization of
Martin Stjernholm <mast@lysator.liu.se>
parents: 48656
diff changeset
908
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
909 (defcustom c-electric-pound-behavior nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
910 "*List of behaviors for electric pound insertion.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
911 Only currently supported behavior is `alignleft'."
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
912 :type '(set (const alignleft))
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
913 :group 'c)
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
914
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
915 (defcustom c-special-indent-hook nil
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
916 "*Hook for user defined special indentation adjustments.
76948
7322915e700b * (c-special-indent-hook): Amend doc-string to mention
Alan Mackenzie <acm@muc.de>
parents: 75516
diff changeset
917 This hook gets called after each line is indented by the mode. It is only
7322915e700b * (c-special-indent-hook): Amend doc-string to mention
Alan Mackenzie <acm@muc.de>
parents: 75516
diff changeset
918 called if `c-syntactic-indentation' is non-nil."
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
919 :type 'hook
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
920 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
921
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
922 (defcustom-c-stylevar c-label-minimum-indentation 1
53073
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
923 "*Minimum indentation for lines inside code blocks.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
924 This variable typically only affects code using the `gnu' style, which
53073
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
925 mandates a minimum of one space in front of every line inside code
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
926 blocks. Specifically, the function `c-gnu-impose-minimum' on your
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
927 `c-special-indent-hook' is what enforces this."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
928 :type 'integer
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
930
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931 (defcustom c-progress-interval 5
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
932 "*Interval used to update progress status during long re-indentation.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
933 If a number, percentage complete gets updated after each interval of
20144
56d81cc7b4f5 (c-progress-interval): Document new semantics
Karl Heuer <kwzh@gnu.org>
parents: 20140
diff changeset
934 that many seconds. To inhibit all messages during indentation, set
56d81cc7b4f5 (c-progress-interval): Document new semantics
Karl Heuer <kwzh@gnu.org>
parents: 20140
diff changeset
935 this variable to nil."
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
936 :type 'integer
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
937 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
938
103117
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
939 (defcustom c-objc-method-arg-min-delta-to-bracket 2
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
940 "*Minimum number of chars to the opening bracket.
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
941
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
942 Consider this ObjC snippet:
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
943
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
944 [foo blahBlah: fred
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
945 |<-x->|barBaz: barney
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
946
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
947 If `x' is less than this number then `c-lineup-ObjC-method-call-colons'
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
948 will defer the indentation decision to the next function. By default
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
949 this is `c-lineup-ObjC-method-call', which would align it like:
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
950
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
951 [foo blahBlahBlah: fred
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
952 thisIsTooDamnLong: barney
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
953
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
954 This behaviour can be overridden by customizing the indentation of
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
955 `objc-method-call-cont' in the \"objc\" style."
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
956 :type 'integer
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
957 :group 'c)
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
958
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
959 (defcustom c-objc-method-arg-unfinished-offset 4
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
960 "*Offset relative to bracket if first selector is on a new line.
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
961
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
962 [aaaaaaaaa
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
963 |<-x->|bbbbbbb: cccccc
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
964 ddddd: eeee];"
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
965 :type 'integer
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
966 :group 'c)
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
967
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
968 (defcustom c-objc-method-parameter-offset 4
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
969 "*Offset for selector parameter on a new line (relative to first selector.
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
970
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
971 [aaaaaaa bbbbbbbbbb:
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
972 |<-x->|cccccccc
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
973 ddd: eeee
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
974 ffff: ggg];"
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
975 :type 'integer
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
976 :group 'c)
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
977
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
978 (defcustom c-default-style '((java-mode . "java") (awk-mode . "awk")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
979 (other . "gnu"))
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
980 "*Style which gets installed by default when a file is visited.
20919
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
981
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
982 The value of this variable can be any style defined in
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
983 `c-style-alist', including styles you add. The value can also be an
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
984 association list of major mode symbols to style names.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
985
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
986 When the value is a string, all CC Mode major modes will install this
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
987 style by default.
20919
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
988
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
989 When the value is an alist, the major mode symbol is looked up in it
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
990 and the associated style is installed. If the major mode is not
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
991 listed in the alist, then the symbol `other' is looked up in it, and
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
992 if found, the style in that entry is used. If `other' is not found in
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
993 the alist, then \"gnu\" style is used.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
994
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
995 The default style gets installed before your mode hooks run, so you
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
996 can always override the use of `c-default-style' by making calls to
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
997 `c-set-style' in the appropriate mode hook."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
998 :type '(radio
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
999 (string :tag "Style in all modes")
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1000 (set :tag "Mode-specific styles"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1001 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1002 (const :format "C " c-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1003 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1004 (const :format "C++ " c++-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1005 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1006 (const :format "ObjC " objc-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1007 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1008 (const :format "Java " java-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1009 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1010 (const :format "IDL " idl-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1011 (cons :format "%v"
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1012 (const :format "Pike " pike-mode) (string :format "%v"))
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1013 (cons :format "%v"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1014 (const :format "AWK " awk-mode) (string :format "%v"))
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1015 (cons :format "%v"
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1016 (const :format "Other " other) (string :format "%v"))))
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1017 :group 'c)
20919
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1018
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1019 ;; *) At the start of a statement or declaration means in more detail:
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1020 ;; At the closest preceding statement/declaration that starts at boi
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1021 ;; and doesn't have a label or comment at that position. If there's
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1022 ;; no such statement within the same block, then back up to the
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1023 ;; surrounding block or statement, add the appropriate
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1024 ;; statement-block-intro, defun-block-intro or substatement syntax
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1025 ;; symbol and continue searching.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1026 (c-set-stylevar-fallback 'c-offsets-alist
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1027 '((string . c-lineup-dont-change)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1028 ;; Anchor pos: Beg of previous line.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1029 (c . c-lineup-C-comments)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1030 ;; Anchor pos: Beg of the comment.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1031 (defun-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1032 ;; Anchor pos: When inside a class: Boi at the func decl start.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1033 ;; When at top level: Bol at the func decl start. When inside
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1034 ;; a code block (only possible in Pike): At the func decl
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1035 ;; start(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1036 (defun-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1037 ;; Anchor pos: At the defun block open if it's at boi,
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1038 ;; otherwise boi at the func decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1039 (defun-block-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1040 ;; Anchor pos: At the block open(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1041 (class-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1042 ;; Anchor pos: Boi at the class decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1043 (class-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1044 ;; Anchor pos: Boi at the class decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1045 (inline-open . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1046 ;; Anchor pos: None for functions (inclass got the relpos
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1047 ;; then), boi at the lambda start for lambdas.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1048 (inline-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1049 ;; Anchor pos: Inexpr functions: At the lambda block open if
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1050 ;; it's at boi, else at the statement(*) at boi of the start of
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1051 ;; the lambda construct. Otherwise: At the inline block open
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1052 ;; if it's at boi, otherwise boi at the func decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1053 (func-decl-cont . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1054 ;; Anchor pos: Boi at the func decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1055 (knr-argdecl-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1056 ;; Anchor pos: Boi at the topmost intro line.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1057 (knr-argdecl . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1058 ;; Anchor pos: At the beginning of the first K&R argdecl.
109599
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1059 (topmost-intro . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1060 ;; Anchor pos: Bol at the last line of previous construct.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1061 (topmost-intro-cont . c-lineup-topmost-intro-cont)
109599
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1062 ;;Anchor pos: Bol at the topmost annotation line
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1063 (annotation-top-cont . 0)
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1064 ;;Anchor pos: Bol at the topmost annotation line
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1065 (annotation-var-cont . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1066 ;; Anchor pos: Boi at the topmost intro line.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1067 (member-init-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1068 ;; Anchor pos: Boi at the func decl arglist open.
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
1069 (member-init-cont . c-lineup-multi-inher)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1070 ;; Anchor pos: Beg of the first member init.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1071 (inher-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1072 ;; Anchor pos: Boi at the class decl start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1073 (inher-cont . c-lineup-multi-inher)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1074 ;; Anchor pos: Java: At the implements/extends keyword start.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1075 ;; Otherwise: At the inher start colon, or boi at the class
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1076 ;; decl start if the first inherit clause hangs and it's not a
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1077 ;; func-local inherit clause (when does that occur?).
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1078 (block-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1079 ;; Anchor pos: Inexpr statement: At the statement(*) at boi of
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1080 ;; the start of the inexpr construct. Otherwise: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1081 (block-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1082 ;; Anchor pos: Inexpr statement: At the inexpr block open if
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1083 ;; it's at boi, else at the statement(*) at boi of the start of
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1084 ;; the inexpr construct. Block hanging on a case/default
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1085 ;; label: At the closest preceding label that starts at boi.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1086 ;; Otherwise: At the block open(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1087 (brace-list-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1088 ;; Anchor pos: Boi at the brace list decl start, but a starting
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1089 ;; "typedef" token is ignored.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1090 (brace-list-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1091 ;; Anchor pos: At the brace list decl start(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1092 (brace-list-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1093 ;; Anchor pos: At the brace list decl start(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1094 (brace-list-entry . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1095 ;; Anchor pos: At the first non-ws char after the open paren if
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1096 ;; the first token is on the same line, otherwise boi at that
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1097 ;; token.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1098 (brace-entry-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1099 ;; Anchor pos: Same as brace-list-entry.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1100 (statement . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1101 ;; Anchor pos: After a `;' in the condition clause of a for
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1102 ;; statement: At the first token after the starting paren.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1103 ;; Otherwise: At the preceding statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1104 (statement-cont . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1105 ;; Anchor pos: After the first token in the condition clause of
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1106 ;; a for statement: At the first token after the starting
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1107 ;; paren. Otherwise: At the containing statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1108 (statement-block-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1109 ;; Anchor pos: In inexpr statement block: At the inexpr block
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1110 ;; open if it's at boi, else at the statement(*) at boi of the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1111 ;; start of the inexpr construct. In a block hanging on a
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1112 ;; case/default label: At the closest preceding label that
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1113 ;; starts at boi. Otherwise: At the start of the containing
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1114 ;; block(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1115 (statement-case-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1116 ;; Anchor pos: At the case/default label(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1117 (statement-case-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1118 ;; Anchor pos: At the case/default label(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1119 (substatement . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1120 ;; Anchor pos: At the containing statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1121 (substatement-open . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1122 ;; Anchor pos: At the containing statement(*).
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1123 (substatement-label . 2)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1124 ;; Anchor pos: At the containing statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1125 (case-label . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1126 ;; Anchor pos: At the start of the switch block(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1127 (access-label . -)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1128 ;; Anchor pos: Same as inclass.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1129 (label . 2)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1130 ;; Anchor pos: At the start of the containing block(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1131 (do-while-closure . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1132 ;; Anchor pos: At the corresponding while statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1133 (else-clause . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1134 ;; Anchor pos: At the corresponding if statement(*).
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1135 (catch-clause . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1136 ;; Anchor pos: At the previous try or catch statement clause(*).
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1137 (comment-intro . (c-lineup-knr-region-comment c-lineup-comment))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1138 ;; Anchor pos: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1139 (arglist-intro . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1140 ;; Anchor pos: At the containing statement(*).
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1141 ;; 2nd pos: At the open paren.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1142 (arglist-cont . (c-lineup-gcc-asm-reg 0))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1143 ;; Anchor pos: At the first token after the open paren.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1144 (arglist-cont-nonempty . (c-lineup-gcc-asm-reg c-lineup-arglist))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1145 ;; Anchor pos: At the containing statement(*).
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1146 ;; 2nd pos: At the open paren.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1147 (arglist-close . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1148 ;; Anchor pos: At the containing statement(*).
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1149 ;; 2nd pos: At the open paren.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1150 (stream-op . c-lineup-streamop)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1151 ;; Anchor pos: Boi at the first stream op in the statement.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1152 (inclass . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1153 ;; Anchor pos: At the class open brace if it's at boi,
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1154 ;; otherwise boi at the class decl start.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1155 (cpp-macro . [0])
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1156 ;; Anchor pos: None.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1157 (cpp-macro-cont . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1158 ;; Anchor pos: At the macro start (always at boi).
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1159 (cpp-define-intro . (c-lineup-cpp-define +))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1160 ;; Anchor pos: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1161 (friend . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1162 ;; Anchor pos: None.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1163 (objc-method-intro . [0])
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1164 ;; Anchor pos: Boi.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1165 (objc-method-args-cont . c-lineup-ObjC-method-args)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1166 ;; Anchor pos: At the method start (always at boi).
103117
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
1167 (objc-method-call-cont . (c-lineup-ObjC-method-call-colons
49b361ba00e8 Enhancements for Objective-C:
Alan Mackenzie <acm@muc.de>
parents: 102278
diff changeset
1168 c-lineup-ObjC-method-call +))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1169 ;; Anchor pos: At the open bracket.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1170 (extern-lang-open . 0)
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1171 (namespace-open . 0)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1172 (module-open . 0)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1173 (composition-open . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1174 ;; Anchor pos: Boi at the extern/namespace/etc keyword.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1175 (extern-lang-close . 0)
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1176 (namespace-close . 0)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1177 (module-close . 0)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1178 (composition-close . 0)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1179 ;; Anchor pos: Boi at the corresponding extern/namespace/etc keyword.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1180 (inextern-lang . +)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1181 (innamespace . +)
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1182 (inmodule . +)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1183 (incomposition . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1184 ;; Anchor pos: At the extern/namespace/etc block open brace if
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1185 ;; it's at boi, otherwise boi at the keyword.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1186 (template-args-cont . (c-lineup-template-args +))
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1187 ;; Anchor pos: Boi at the decl start. This might be changed;
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1188 ;; the logical position is clearly the opening '<'.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1189 (inlambda . c-lineup-inexpr-block)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1190 ;; Anchor pos: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1191 (lambda-intro-cont . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1192 ;; Anchor pos: Boi at the lambda start.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1193 (inexpr-statement . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1194 ;; Anchor pos: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1195 (inexpr-class . +)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1196 ;; Anchor pos: None.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1197 ))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1198 (defcustom c-offsets-alist nil
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1199 "Association list of syntactic element symbols and indentation offsets.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1200 As described below, each cons cell in this list has the form:
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
1201
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1202 (SYNTACTIC-SYMBOL . OFFSET)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1203
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1204 When a line is indented, CC Mode first determines the syntactic
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1205 context of it by generating a list of symbols called syntactic
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1206 elements. The global variable `c-syntactic-context' is bound to the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1207 that list. Each element in the list is in turn a list where the first
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1208 element is a syntactic symbol which tells what kind of construct the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1209 indentation point is located within. More elements in the syntactic
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1210 element lists are optional. If there is one more and it isn't nil,
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1211 then it's the anchor position for that construct.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1212
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1213 After generating the syntactic context for the line, CC Mode
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1214 calculates the absolute indentation: First the base indentation is
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1215 found by using the anchor position for the first syntactic element
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1216 that provides one. If none does, zero is used as base indentation.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1217 Then CC Mode looks at each syntactic element in the context in turn.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1218 It compares the car of the syntactic element against the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1219 SYNTACTIC-SYMBOL's in `c-offsets-alist'. When it finds a match, it
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1220 adds OFFSET to the base indentation. The sum of this calculation is
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1221 the absolute offset for line being indented.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1222
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1223 If the syntactic element does not match any in the `c-offsets-alist',
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1224 the element is ignored.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1225
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1226 OFFSET can specify an offset in several different ways:
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1227
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1228 If OFFSET is nil then it's ignored.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1229
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1230 If OFFSET is an integer then it's used as relative offset, i.e. it's
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1231 added to the base indentation.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1232
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1233 If OFFSET is one of the symbols `+', `-', `++', `--', `*', or `/'
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1234 then a positive or negative multiple of `c-basic-offset' is added to
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1235 the base indentation; 1, -1, 2, -2, 0.5, and -0.5, respectively.
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1236
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1237 If OFFSET is a symbol with a value binding then that value, which
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1238 must be an integer, is used as relative offset.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1239
75516
befb5e26b9e7 (c-offsets-alist): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 75347
diff changeset
1240 If OFFSET is a vector then its first element, which must be an
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1241 integer, is used as an absolute indentation column. This overrides
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1242 the previous base indentation and the relative offsets applied to
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1243 it, and it becomes the new base indentation.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1244
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1245 If OFFSET is a function or a lambda expression then it's called with
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1246 a single argument containing the cons of the syntactic symbol and
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1247 the anchor position (or nil if there is none). The return value
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1248 from the function is then reinterpreted as an offset specification.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1249
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1250 If OFFSET is a list then its elements are evaluated recursively as
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1251 offset specifications. If the first element is any of the symbols
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1252 below then it isn't evaluated but instead specifies how the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1253 remaining offsets in the list should be combined. If it's something
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1254 else then the list is combined according the method `first'. The
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1255 valid combination methods are:
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1256
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1257 `first' -- Use the first offset (that doesn't evaluate to nil).
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1258 `min' -- Use the minimum of all the offsets. All must be either
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1259 relative or absolute - they can't be mixed.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1260 `max' -- Use the maximum of all the offsets. All must be either
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1261 relative or absolute - they can't be mixed.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1262 `add' -- Add all the evaluated offsets together. Exactly one of
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1263 them may be absolute, in which case the result is
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1264 absolute. Any relative offsets that preceded the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1265 absolute one in the list will be ignored in that case.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1266
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1267 `c-offsets-alist' is a style variable. This means that the offsets on
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1268 this variable are normally taken from the style system in CC Mode
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1269 \(see `c-default-style' and `c-style-alist'). However, any offsets
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1270 put explicitly on this list will override the style system when a CC
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1271 Mode buffer is initialized \(there is a variable
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1272 `c-old-style-variable-behavior' that changes this, though).
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1273
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1274 Here is the current list of valid syntactic element symbols:
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1275
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1276 string -- Inside multi-line string.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1277 c -- Inside a multi-line C style block comment.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1278 defun-open -- Brace that opens a function definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1279 defun-close -- Brace that closes a function definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1280 defun-block-intro -- The first line in a top-level defun.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1281 class-open -- Brace that opens a class definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1282 class-close -- Brace that closes a class definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1283 inline-open -- Brace that opens an in-class inline method.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1284 inline-close -- Brace that closes an in-class inline method.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1285 func-decl-cont -- The region between a function definition's
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1286 argument list and the function opening brace
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1287 (excluding K&R argument declarations). In C, you
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1288 cannot put anything but whitespace and comments
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1289 between them; in C++ and Java, throws declarations
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1290 and other things can appear in this context.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1291 knr-argdecl-intro -- First line of a K&R C argument declaration.
109599
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1292 knr-argdecl -- Subsequent lines in a K&R C argument declaration.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1293 topmost-intro -- The first line in a topmost construct definition.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1294 topmost-intro-cont -- Topmost definition continuation lines.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1295 annotation-top-cont -- Topmost definition continuation line where only
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1296 annotations are on previous lines.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1297 annotation-var-cont -- A continuation of a C (or like) statement where
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1298 only annotations are on previous lines.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1299 member-init-intro -- First line in a member initialization list.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1300 member-init-cont -- Subsequent member initialization list lines.
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1301 inher-intro -- First line of a multiple inheritance list.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1302 inher-cont -- Subsequent multiple inheritance lines.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1303 block-open -- Statement block open brace.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1304 block-close -- Statement block close brace.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1305 brace-list-open -- Open brace of an enum or static array list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1306 brace-list-close -- Close brace of an enum or static array list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1307 brace-list-intro -- First line in an enum or static array list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1308 brace-list-entry -- Subsequent lines in an enum or static array list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1309 brace-entry-open -- Subsequent lines in an enum or static array
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1310 list that start with an open brace.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1311 statement -- A C (or like) statement.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1312 statement-cont -- A continuation of a C (or like) statement.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1313 statement-block-intro -- The first line in a new statement block.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1314 statement-case-intro -- The first line in a case \"block\".
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1315 statement-case-open -- The first line in a case block starting with brace.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1316 substatement -- The first line after an if/while/for/do/else.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1317 substatement-open -- The brace that opens a substatement block.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1318 substatement-label -- Labelled line after an if/while/for/do/else.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1319 case-label -- A \"case\" or \"default\" label.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1320 access-label -- C++ private/protected/public access label.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1321 label -- Any ordinary label.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1322 do-while-closure -- The \"while\" that ends a do/while construct.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1323 else-clause -- The \"else\" of an if/else construct.
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1324 catch-clause -- The \"catch\" or \"finally\" of a try/catch construct.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1325 comment-intro -- A line containing only a comment introduction.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1326 arglist-intro -- The first line in an argument list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1327 arglist-cont -- Subsequent argument list lines when no
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1328 arguments follow on the same line as the
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1329 arglist opening paren.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1330 arglist-cont-nonempty -- Subsequent argument list lines when at
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1331 least one argument follows on the same
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1332 line as the arglist opening paren.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1333 arglist-close -- The solo close paren of an argument list.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1334 stream-op -- Lines continuing a stream operator construct.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1335 inclass -- The construct is nested inside a class definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1336 Used together with e.g. `topmost-intro'.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1337 cpp-macro -- The start of a C preprocessor macro definition.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1338 cpp-macro-cont -- Inside a multi-line C preprocessor macro definition.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1339 friend -- A C++ friend declaration.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1340 objc-method-intro -- The first line of an Objective-C method definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1341 objc-method-args-cont -- Lines continuing an Objective-C method definition.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1342 objc-method-call-cont -- Lines continuing an Objective-C method call.
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1343 extern-lang-open -- Brace that opens an \"extern\" block.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1344 extern-lang-close -- Brace that closes an \"extern\" block.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1345 inextern-lang -- Analogous to the `inclass' syntactic symbol,
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1346 but used inside \"extern\" blocks.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1347 namespace-open, namespace-close, innamespace
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1348 -- Similar to the three `extern-lang' symbols, but for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1349 C++ \"namespace\" blocks.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1350 module-open, module-close, inmodule
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1351 -- Similar to the three `extern-lang' symbols, but for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1352 CORBA IDL \"module\" blocks.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1353 composition-open, composition-close, incomposition
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1354 -- Similar to the three `extern-lang' symbols, but for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1355 CORBA CIDL \"composition\" blocks.
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1356 template-args-cont -- C++ template argument list continuations.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1357 inlambda -- In the header or body of a lambda function.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1358 lambda-intro-cont -- Continuation of the header of a lambda function.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1359 inexpr-statement -- The statement is inside an expression.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1360 inexpr-class -- The class is inside an expression. Used e.g. for
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1361 Java anonymous classes."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1362 :type
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1363 `(set :format "%{%t%}:
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1364 Override style setting
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1365 | Syntax Offset
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1366 %v"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1367 ,@(mapcar
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1368 (lambda (elt)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1369 `(cons :format "%v"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1370 :value ,elt
79841
3a06f32d85f6 * (c-constant-symbol): New function which supersedes c-const-symbol.
Alan Mackenzie <acm@muc.de>
parents: 79717
diff changeset
1371 ,(c-constant-symbol (car elt) 25)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1372 (sexp :format "%v"
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1373 :validate
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1374 (lambda (widget)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1375 (unless (c-valid-offset (widget-value widget))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1376 (widget-put widget :error "Invalid offset")
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1377 widget)))))
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1378 (get 'c-offsets-alist 'c-stylevar-fallback)))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1379 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1380
53073
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1381 ;; The syntactic symbols that can occur inside code blocks. Used by
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1382 ;; `c-gnu-impose-minimum'.
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1383 (defconst c-inside-block-syms
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1384 '(defun-block-intro block-open block-close statement statement-cont
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1385 statement-block-intro statement-case-intro statement-case-open
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1386 substatement substatement-open substatement-label case-label label
109599
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1387 do-while-closure else-clause catch-clause inlambda annotation-var-cont))
53073
49f65e04ba8e CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents: 52609
diff changeset
1388
30399
7b0a7b155fe2 (c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents: 26817
diff changeset
1389 (defcustom c-style-variables-are-local-p t
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1390 "*Whether style variables should be buffer local by default.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1391 If non-nil, then all indentation style related variables will be made
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1392 buffer local by default. If nil, they will remain global. Variables
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1393 are made buffer local when this file is loaded, and once buffer
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1394 localized, they cannot be made global again.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1395
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1396 This variable must be set appropriately before CC Mode is loaded.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1397
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1398 The list of variables to buffer localize are:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1399 c-basic-offset
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1400 c-comment-only-line-offset
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1401 c-indent-comment-alist
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1402 c-indent-comments-syntactically-p
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1403 c-block-comment-prefix
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1404 c-comment-prefix-regexp
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1405 c-doc-comment-style
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1406 c-cleanup-list
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1407 c-hanging-braces-alist
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1408 c-hanging-colons-alist
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1409 c-hanging-semi&comma-criteria
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1410 c-backslash-column
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1411 c-backslash-max-column
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1412 c-label-minimum-indentation
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1413 c-offsets-alist
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1414 c-special-indent-hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1415 c-indentation-style"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1416 :type 'boolean
102278
527143cc2cfe (c-style-variables-are-local-p): Mark as safe if boolean. (Bug#2197)
Glenn Morris <rgm@gnu.org>
parents: 101112
diff changeset
1417 :safe 'booleanp
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1418 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1419
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1420 (defcustom c-mode-hook nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1421 "*Hook called by `c-mode'."
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1422 :type 'hook
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1423 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1424
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1425 (defcustom c++-mode-hook nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1426 "*Hook called by `c++-mode'."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1427 :type 'hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1428 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1429
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1430 (defcustom objc-mode-hook nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1431 "*Hook called by `objc-mode'."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1432 :type 'hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1433 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1434
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1435 (defcustom java-mode-hook nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1436 "*Hook called by `java-mode'."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1437 :type 'hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1438 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1439
19255
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1440 (defcustom idl-mode-hook nil
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1441 "*Hook called by `idl-mode'."
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1442 :type 'hook
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1443 :group 'c)
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1444
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1445 (defcustom pike-mode-hook nil
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1446 "*Hook called by `pike-mode'."
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1447 :type 'hook
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1448 :group 'c)
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1449
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1450 (defcustom awk-mode-hook nil
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1451 "*Hook called by `awk-mode'."
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1452 :type 'hook
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1453 :group 'c)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1454
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1455 (defcustom c-mode-common-hook nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1456 "*Hook called by all CC Mode modes for common initializations."
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1457 :type 'hook
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1458 :group 'c)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1459
19255
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1460 (defcustom c-initialization-hook nil
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1461 "*Hook called when the CC Mode package gets initialized.
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1462 This hook is only run once per Emacs session and can be used as a
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1463 `load-hook' or in place of using `eval-after-load'."
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1464 :type 'hook
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1465 :group 'c)
40a9475f22ea (idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 18848
diff changeset
1466
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
1467 (defcustom c-enable-xemacs-performance-kludge-p nil
20919
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1468 "*Enables a XEmacs only hack that may improve speed for some coding styles.
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1469 For styles that hang top-level opening braces (as is common with JDK
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1470 Java coding styles) this can improve performance between 3 and 60
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1471 times for core indentation functions (e.g. `c-parse-state'). For
9cffecf3b1ca (c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 20144
diff changeset
1472 styles that conform to the Emacs recommendation of putting these
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21111
diff changeset
1473 braces in column zero, this can degrade performance about as much.
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1474 This variable only has effect in XEmacs."
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1475 :type 'boolean
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1476 :group 'c)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1477
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1478 (defvar c-old-style-variable-behavior nil
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1479 "*Enables the old style variable behavior when non-nil.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1480
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1481 Normally the values of the style variables will override the style
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1482 settings specified by the variables `c-default-style' and
44728
7a3ac6c387fe CC Mode update to version 5.29. This is for testing; it's not a released
Martin Stjernholm <mast@lysator.liu.se>
parents: 44412
diff changeset
1483 `c-style-alist'. However, in CC Mode 5.25 and earlier, it was the
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1484 other way around, meaning that changes made to the style variables
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1485 from e.g. Customize would not take effect unless special precautions
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1486 were taken. That was confusing, especially for novice users.
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1487
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1488 It's believed that despite this change, the new behavior will still
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1489 produce the same results for most old CC Mode configurations, since
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1490 all style variables are per default set in a special non-override
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1491 state. Set this variable only if your configuration has stopped
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1492 working due to this change.")
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1493
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1494 (define-widget 'c-extra-types-widget 'radio
52340
600f01b30149 (c-extra-types-widget): The doc string is mandatory in
Martin Stjernholm <mast@lysator.liu.se>
parents: 51949
diff changeset
1495 "Internal CC Mode widget for the `*-font-lock-extra-types' variables."
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1496 :args '((const :tag "none" nil)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1497 (repeat :tag "types" regexp)))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1498
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1499 (defun c-make-font-lock-extra-types-blurb (mode1 mode2 example)
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1500 (concat "\
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1501 *List of extra types (aside from the type keywords) to recognize in "
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1502 mode1 " mode.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1503 Each list item should be a regexp matching a single identifier.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1504 " example "
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1505
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1506 Note that items on this list that don't include any regexp special
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1507 characters are automatically optimized using `regexp-opt', so you
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1508 should not use `regexp-opt' explicitly to build regexps here.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1509
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1510 On decoration level 3 (and higher, where applicable), a method is used
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1511 that finds most types and declarations by syntax alone. This variable
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1512 is still used as a first step, but other types are recognized
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1513 correctly anyway in most cases. Therefore this variable should be
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1514 fairly restrictive and not contain patterns that are uncertain.
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1515
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1516 Note that this variable is only consulted when the major mode is
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1517 initialized. If you change it later you have to reinitialize CC Mode
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1518 by doing \\[" mode2 "].
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1519
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1520 Despite the name, this variable is not only used for font locking but
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1521 also elsewhere in CC Mode to tell types from other identifiers."))
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1522
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1523 ;; Note: Most of the variables below are also defined in font-lock.el
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1524 ;; in older versions of Emacs, so depending on the load order we might
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1525 ;; not install the values below. There's no kludge to cope with this
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1526 ;; (as opposed to the *-font-lock-keywords-* variables) since the old
52340
600f01b30149 (c-extra-types-widget): The doc string is mandatory in
Martin Stjernholm <mast@lysator.liu.se>
parents: 51949
diff changeset
1527 ;; values work fairly well anyway.
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1528
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1529 (defcustom c-font-lock-extra-types
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1530 '("\\sw+_t"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1531 ;; Defined in C99:
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1532 "bool" "complex" "imaginary"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1533 ;; Standard library types (except those matched by the _t pattern):
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1534 "FILE" "lconv" "tm" "va_list" "jmp_buf"
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1535 ;; I do not appreciate the following very Emacs-specific luggage
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1536 ;; in the default value, but otoh it can hardly get in the way for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1537 ;; other users, and removing it would cause unnecessary grief for
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1538 ;; the old timers that are used to it. /mast
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1539 "Lisp_Object")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1540 (c-make-font-lock-extra-types-blurb "C" "c-mode"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1541 "For example, a value of (\"FILE\" \"\\\\sw+_t\") means the word \"FILE\"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1542 and words ending in \"_t\" are treated as type names.")
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1543 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1544 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1545
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1546 (defcustom c++-font-lock-extra-types
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1547 '("\\sw+_t"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1548 ;; C library types (except those matched by the _t pattern):
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1549 "FILE" "lconv" "tm" "va_list" "jmp_buf"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1550 ;; Some standard C++ types that came from font-lock.el.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1551 ;; Experienced C++ users says there's no clear benefit in
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1552 ;; extending this to all the types in the standard library, at
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1553 ;; least not when they'll be recognized without "std::" too.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1554 "istream" "istreambuf"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1555 "ostream" "ostreambuf"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1556 "ifstream" "ofstream" "fstream"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1557 "strstream" "strstreambuf" "istrstream" "ostrstream"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1558 "ios"
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1559 "string" "rope"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1560 "list" "slist"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1561 "deque" "vector" "bit_vector"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1562 "set" "multiset"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1563 "map" "multimap"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1564 "hash"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1565 "hash_set" "hash_multiset"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1566 "hash_map" "hash_multimap"
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1567 "stack" "queue" "priority_queue"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1568 "type_info"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1569 "iterator" "const_iterator" "reverse_iterator" "const_reverse_iterator"
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1570 "reference" "const_reference")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1571 (c-make-font-lock-extra-types-blurb "C++" "c++-mode"
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1572 "For example, a value of (\"string\") means the word \"string\" is treated
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1573 as a type name.")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1574 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1575 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1576
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1577 (defcustom objc-font-lock-extra-types
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1578 (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1579 (c-make-font-lock-extra-types-blurb "ObjC" "objc-mode" (concat
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1580 "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1581 capitalized words are treated as type names (the requirement for a
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1582 lower case char is to avoid recognizing all-caps macro and constant
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1583 names)."))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1584 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1585 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1586
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1587 (defcustom java-font-lock-extra-types
109599
c18dffa2ba46 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Alan Mackenzie <acm@muc.de>
parents: 106815
diff changeset
1588 (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw"))
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1589 (c-make-font-lock-extra-types-blurb "Java" "java-mode" (concat
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1590 "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1591 capitalized words are treated as type names (the requirement for a
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1592 lower case char is to avoid recognizing all-caps constant names)."))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1593 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1594 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1595
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1596 (defcustom idl-font-lock-extra-types nil
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1597 (c-make-font-lock-extra-types-blurb "IDL" "idl-mode" "")
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1598 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1599 :group 'c)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1600
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1601 (defcustom pike-font-lock-extra-types
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1602 (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*"))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1603 (c-make-font-lock-extra-types-blurb "Pike" "pike-mode" (concat
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1604 "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1605 capitalized words are treated as type names (the requirement for a
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1606 lower case char is to avoid recognizing all-caps macro and constant
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1607 names)."))
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1608 :type 'c-extra-types-widget
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1609 :group 'c)
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1610
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1611
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1612 ;; Non-customizable variables, still part of the interface to CC Mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1613 (defvar c-file-style nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1614 "Variable interface for setting style via File Local Variables.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1615 In a file's Local Variable section, you can set this variable to a
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1616 string suitable for `c-set-style'. When the file is visited, CC Mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1617 will set the style of the file to this value automatically.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1618
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1619 Note that file style settings are applied before file offset settings
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1620 as designated in the variable `c-file-offsets'.")
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1621 (make-variable-buffer-local 'c-file-style)
70590
63b772bfba93 Move `safe-local-variable' declarations to the respective files.
Reiner Steib <Reiner.Steib@gmx.de>
parents: 69140
diff changeset
1622 ;;;###autoload(put 'c-file-style 'safe-local-variable 'string-or-null-p)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1623
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1624 (defvar c-file-offsets nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1625 "Variable interface for setting offsets via File Local Variables.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1626 In a file's Local Variable section, you can set this variable to an
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1627 association list similar to the values allowed in `c-offsets-alist'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1628 When the file is visited, CC Mode will institute these offset settings
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1629 automatically.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1630
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1631 Note that file offset settings are applied after file style settings
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1632 as designated in the variable `c-file-style'.")
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1633 (make-variable-buffer-local 'c-file-offsets)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1634
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1635 ;; It isn't possible to specify a doc-string without specifying an
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1636 ;; initial value with `defvar', so the following two variables have been
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1637 ;; given doc-strings by setting the property `variable-documentation'
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1638 ;; directly. C-h v will read this documentation only for versions of GNU
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1639 ;; Emacs from 22.1. It's really good not to have an initial value for
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1640 ;; variables like these that always should be dynamically bound, so it's
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1641 ;; worth the inconvenience.
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1642
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1643 (cc-bytecomp-defvar c-syntactic-context)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1644 (defvar c-syntactic-context)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1645 (put 'c-syntactic-context 'variable-documentation
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1646 "Variable containing the syntactic analysis list for a line of code.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1647
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1648 It is a list with one element for each syntactic symbol pertinent to the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1649 line, for example \"((defun-block-intro 1) (comment-intro))\".
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1650
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1651 It is dynamically bound when calling \(i) a brace hanging \"action
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1652 function\"; \(ii) a semicolon/comma hanging \"criteria function\"; \(iii) a
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1653 \"line-up function\"; \(iv) a c-special-indent-hook function. It is also
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1654 used internally by CC Mode.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1655
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1656 c-syntactic-context is always bound dynamically. It must NEVER be set
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1657 statically (e.g. with `setq').")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1658
51714
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1659
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1660 (cc-bytecomp-defvar c-syntactic-element)
bc91cbf50c24 Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents: 49857
diff changeset
1661 (defvar c-syntactic-element)
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1662 (put 'c-syntactic-element 'variable-documentation
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1663 "Variable containing the current syntactic element during calls to
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1664 the lineup functions. The value is one of the elements in the list in
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1665 `c-syntactic-context' and is a list with the symbol name in the first
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1666 position, followed by zero or more elements containing any additional
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1667 info associated with the syntactic symbol. There are accessor functions
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1668 `c-langelem-sym', `c-langelem-pos', `c-langelem-col', and
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1669 `c-langelem-2nd-pos' to access the list.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1670
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1671 Specifically, the element returned by `c-langelem-pos' is the anchor
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1672 position, or nil if there isn't any. See the comments in the
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1673 `c-offsets-alist' variable and the CC Mode manual for more detailed info
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1674 about the data each syntactic symbol provides.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1675
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1676 This is always bound dynamically. It should never be set
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1677 statically (e.g. with `setq').")
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1678
26817
03befb219d03 Installed version 5.26
Gerd Moellmann <gerd@gnu.org>
parents: 24282
diff changeset
1679 (defvar c-indentation-style nil
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1680 "Name of the currently installed style.
75027
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
1681 Don't change this directly; call `c-set-style' instead, or set the variable
9f636bd65206 Update CC Mode to version 5.31.4. The detailed changes are those
Alan Mackenzie <acm@muc.de>
parents: 74372
diff changeset
1682 `c-file-style' in the file's Local Variable list.")
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1683
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1684 (defvar c-current-comment-prefix nil
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1685 "The current comment prefix regexp.
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1686 Set from `c-comment-prefix-regexp' at mode initialization.")
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1687 (make-variable-buffer-local 'c-current-comment-prefix)
19298
4a99e63dc4a9 (c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 19255
diff changeset
1688
67252
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1689 ;; N.B. The next three variables are initialized in
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1690 ;; c-setup-paragraph-variables. Their initializations here are "just in
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1691 ;; case". ACM, 2004/2/15. They are NOT buffer local (yet?).
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1692 (defvar c-string-par-start
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1693 ;; (concat "\\(" (default-value 'paragraph-start) "\\)\\|[ \t]*\\\\$")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1694 "\f\\|[ \t]*\\\\?$"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1695 "Value of paragraph-start used when scanning strings.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1696 It treats escaped EOLs as whitespace.")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1697
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1698 (defvar c-string-par-separate
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1699 ;; (concat "\\(" (default-value 'paragraph-separate) "\\)\\|[ \t]*\\\\$")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1700 "[ \t\f]*\\\\?$"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1701 "Value of paragraph-separate used when scanning strings.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1702 It treats escaped EOLs as whitespace.")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1703
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1704 (defvar c-sentence-end-with-esc-eol
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1705 (concat "\\(\\(" (c-default-value-sentence-end) "\\)"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1706 ;; N.B.: "$" would be illegal when not enclosed like "\\($\\)".
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1707 "\\|" "[.?!][]\"')}]* ?\\\\\\($\\)[ \t\n]*"
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1708 "\\)")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1709 "Value used like sentence-end used when scanning strings.
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1710 It treats escaped EOLs as whitespace.")
04d2abb755d9 Update CC Mode to release 5.31.
Alan Mackenzie <acm@muc.de>
parents: 64699
diff changeset
1711
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1712
36920
32a4317c6aa5 Update to version 5.28.
Gerd Moellmann <gerd@gnu.org>
parents: 34304
diff changeset
1713 (cc-provide 'cc-vars)
38422
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 36920
diff changeset
1714
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 88022
diff changeset
1715 ;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1716 ;;; cc-vars.el ends here