Mercurial > emacs
annotate lisp/progmodes/cc-vars.el @ 59061:a7985894de81
Comment change.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Tue, 21 Dec 2004 11:50:52 +0000 |
| parents | b7446b6f097d |
| children | ea1a26b1456d d8411455de48 |
| rev | line source |
|---|---|
| 18720 | 1 ;;; cc-vars.el --- user customization variables for CC Mode |
| 2 | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
3 ;; Copyright (C) 1985,1987,1992-2003 Free Software Foundation, Inc. |
| 18720 | 4 |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
5 ;; Authors: 1998- Martin Stjernholm |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
6 ;; 1992-1999 Barry A. Warsaw |
| 18720 | 7 ;; 1987 Dave Detlefs and Stewart Clamen |
| 8 ;; 1985 Richard M. Stallman | |
| 24282 | 9 ;; Maintainer: bug-cc-mode@gnu.org |
| 18720 | 10 ;; Created: 22-Apr-1997 (split from cc-mode.el) |
|
20144
56d81cc7b4f5
(c-progress-interval): Document new semantics
Karl Heuer <kwzh@gnu.org>
parents:
20140
diff
changeset
|
11 ;; Version: See cc-mode.el |
| 18720 | 12 ;; Keywords: c languages oop |
| 13 | |
| 14 ;; This file is part of GNU Emacs. | |
| 15 | |
| 16 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
| 17 ;; it under the terms of the GNU General Public License as published by | |
| 18 ;; the Free Software Foundation; either version 2, or (at your option) | |
| 19 ;; any later version. | |
| 20 | |
| 21 ;; GNU Emacs is distributed in the hope that it will be useful, | |
| 22 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 24 ;; GNU General Public License for more details. | |
| 25 | |
| 26 ;; You should have received a copy of the GNU General Public License | |
|
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
|
27 ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 36920 | 28 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18720 | 29 ;; Boston, MA 02111-1307, USA. |
| 30 | |
|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Jan?k <Pavel@Janik.cz>
parents:
36920
diff
changeset
|
31 ;;; Commentary: |
|
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Jan?k <Pavel@Janik.cz>
parents:
36920
diff
changeset
|
32 |
|
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Jan?k <Pavel@Janik.cz>
parents:
36920
diff
changeset
|
33 ;;; Code: |
|
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Jan?k <Pavel@Janik.cz>
parents:
36920
diff
changeset
|
34 |
| 24282 | 35 (eval-when-compile |
| 26817 | 36 (let ((load-path |
| 36920 | 37 (if (and (boundp 'byte-compile-dest-file) |
| 38 (stringp byte-compile-dest-file)) | |
| 39 (cons (file-name-directory byte-compile-dest-file) load-path) | |
| 26817 | 40 load-path))) |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
41 (load "cc-bytecomp" nil t))) |
| 36920 | 42 |
| 43 (cc-require 'cc-defs) | |
| 44 | |
| 45 ;; Silence the compiler. | |
| 46 (cc-bytecomp-defun get-char-table) ; XEmacs 20+ | |
| 47 (cc-bytecomp-defun char-table-range) ; Emacs 19+ | |
| 48398 | 48 (cc-bytecomp-defun char-table-p) ; Emacs 19+, XEmacs 20+ |
| 24282 | 49 |
| 36920 | 50 ;; Pull in custom if it exists and is recent enough (the one in Emacs |
| 51 ;; 19.34 isn't). | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
52 (eval |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
53 (cc-eval-when-compile |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
54 (condition-case nil |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
55 (progn |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
56 (require 'custom) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
57 (or (fboundp 'defcustom) (error "")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
58 (require 'widget) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
59 '(progn ; Compile in the require's. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
60 (require 'custom) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
61 (require 'widget))) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
62 (error |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
63 (message "Warning: Compiling without Customize support \ |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
64 since a (good enough) custom library wasn't found") |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
65 (cc-bytecomp-defmacro define-widget (name class doc &rest args)) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
66 (cc-bytecomp-defmacro defgroup (symbol members doc &rest args)) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
67 (cc-bytecomp-defmacro defcustom (symbol value doc &rest args) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
68 `(defvar ,symbol ,value ,doc)) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
69 (cc-bytecomp-defmacro custom-declare-variable (symbol value doc |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
70 &rest args) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
71 `(defvar ,(eval symbol) ,(eval value) ,doc)) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
72 nil)))) |
| 18720 | 73 |
|
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
|
74 (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
|
75 ;; 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
|
76 ;; 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
|
77 ;; `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
|
78 ;; 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
|
79 (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
|
80 (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
|
81 `(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
|
82 |
| 18720 | 83 |
| 26817 | 84 ;;; Helpers |
| 18720 | 85 |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
86 ;; This widget exists in newer versions of the Custom library |
| 24282 | 87 (or (get 'other 'widget-type) |
| 88 (define-widget 'other 'sexp | |
| 89 "Matches everything, but doesn't let the user edit the value. | |
| 90 Useful as last item in a `choice' widget." | |
| 91 :tag "Other" | |
| 92 :format "%t%n" | |
| 93 :value 'other)) | |
| 94 | |
| 26817 | 95 (define-widget 'c-const-symbol 'item |
| 96 "An uneditable lisp symbol." | |
| 97 :value nil | |
| 98 :tag "Symbol" | |
| 99 :format "%t: %v\n%d" | |
| 100 :match (lambda (widget value) (symbolp value)) | |
| 101 :value-to-internal | |
| 102 (lambda (widget value) | |
| 103 (let ((s (if (symbolp value) | |
| 104 (symbol-name value) | |
| 105 value)) | |
| 106 (l (widget-get widget :size))) | |
| 107 (if l | |
| 108 (setq s (concat s (make-string (- l (length s)) ?\ )))) | |
| 109 s)) | |
| 110 :value-to-external | |
| 111 (lambda (widget value) | |
| 112 (if (stringp value) | |
| 113 (intern (progn | |
| 114 (string-match "\\`[^ ]*" value) | |
| 115 (match-string 0 value))) | |
| 116 value))) | |
| 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 | 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 | 169 "List of the style variables.") |
| 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 | 177 (defmacro defcustom-c-stylevar (name val doc &rest args) |
| 178 "Defines a style variable." | |
|
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
|
179 `(let ((-value- ,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
|
180 (c-set-stylevar-fallback ',name -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
|
181 (custom-declare-variable |
|
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
|
182 ',name ''set-from-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
|
183 ,(concat doc " |
| 26817 | 184 |
| 185 This is a style variable. Apart from the valid values described | |
| 186 above, it can be set to the symbol `set-from-style'. In that case, it | |
| 187 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
|
188 `c-style-alist') when a CC Mode buffer is initialized. Otherwise, |
| 26817 | 189 the value set here overrides the style system (there is a variable |
| 190 `c-old-style-variable-behavior' that changes this, though).") | |
|
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
|
191 ,@(plist-put |
|
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
|
192 args ':type |
|
49857
252629d76098
Revert last change.
Juanma Barranquero <lekktu@gmail.com>
parents:
49853
diff
changeset
|
193 `(` (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
|
194 (const :tag "Use style settings" |
|
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 set-from-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
|
196 ,(, (let ((type (eval (plist-get args ':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
|
197 (unless (consp 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
|
198 (setq type (list 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
|
199 (unless (c-safe (plist-get (cdr type) ':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
|
200 (setcdr type (append '(:value (, -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
|
201 (cdr 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
|
202 (unless (c-safe (plist-get (cdr type) ':tag)) |
|
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
|
203 (setcdr type (append '(:tag "Override style settings") |
|
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
|
204 (cdr 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
|
205 (bq-process type))))))))) |
| 26817 | 206 |
| 207 (defun c-valid-offset (offset) | |
| 208 "Return non-nil iff OFFSET is a valid offset for a syntactic symbol. | |
| 209 See `c-offsets-alist'." | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
210 ;; This function does not do any hidden buffer changes. |
| 26817 | 211 (or (eq offset '+) |
| 212 (eq offset '-) | |
| 213 (eq offset '++) | |
| 214 (eq offset '--) | |
| 215 (eq offset '*) | |
| 216 (eq offset '/) | |
| 217 (integerp offset) | |
| 218 (functionp offset) | |
| 219 (and (symbolp offset) | |
| 220 (or (boundp offset) | |
| 221 (fboundp 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
|
222 (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
|
223 (= (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
|
224 (integerp (elt offset 0))) |
| 26817 | 225 (progn |
| 226 (while (and (consp offset) | |
| 227 (c-valid-offset (car offset))) | |
| 228 (setq offset (cdr offset))) | |
| 229 (null offset)))) | |
| 230 | |
| 231 | |
| 232 | |
| 233 ;;; User variables | |
| 234 | |
| 235 (defcustom c-strict-syntax-p nil | |
| 236 "*If non-nil, all syntactic symbols must be found in `c-offsets-alist'. | |
| 237 If the syntactic symbol for a particular line does not match a symbol | |
| 238 in the offsets alist, or if no non-nil offset value can be determined | |
| 239 for a symbol, an error is generated, otherwise no error is reported | |
| 240 and the syntactic symbol is ignored. | |
| 241 | |
| 242 This variable is considered obsolete; it doesn't work well with lineup | |
| 243 functions that return nil to support the feature of using lists on | |
| 244 syntactic symbols in `c-offsets-alist'. Please keep it set to nil." | |
| 245 :type 'boolean | |
| 246 :group 'c) | |
| 247 | |
| 248 (defcustom c-echo-syntactic-information-p nil | |
| 249 "*If non-nil, syntactic info is echoed when the line is indented." | |
| 250 :type 'boolean | |
| 251 :group 'c) | |
| 252 | |
|
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
|
253 (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
|
254 "*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
|
255 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
|
256 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
|
257 |
|
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
|
258 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
|
259 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
|
260 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
|
261 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
|
262 :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
|
263 :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
|
264 |
| 26817 | 265 (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
|
266 "*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
|
267 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
|
268 nil." |
| 26817 | 269 :type 'integer |
| 270 :group 'c) | |
| 271 | |
| 18720 | 272 (defcustom c-tab-always-indent t |
| 273 "*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
|
274 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
|
275 TAB indents the current line if point is at the left margin or in the |
|
b7446b6f097d
Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents:
53073
diff
changeset
|
276 line's indentation, otherwise it inserts a `real' tab character \(see |
|
b7446b6f097d
Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents:
53073
diff
changeset
|
277 note\). If some other value (not nil or t), then tab is inserted only |
|
b7446b6f097d
Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents:
53073
diff
changeset
|
278 within literals \(comments and strings), but the line is always |
|
b7446b6f097d
Updated CC Mode to 5.30.9.
Martin Stjernholm <mast@lysator.liu.se>
parents:
53073
diff
changeset
|
279 reindented. |
| 18720 | 280 |
| 281 Note: The value of `indent-tabs-mode' will determine whether a real | |
| 26817 | 282 tab character will be inserted, or the equivalent number of spaces. |
| 18720 | 283 When inserting a tab, actually the function stored in the variable |
| 284 `c-insert-tab-function' is called. | |
| 285 | |
| 286 Note: indentation of lines containing only comments is also controlled | |
| 287 by the `c-comment-only-line-offset' variable." | |
| 288 :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
|
289 (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
|
290 (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
|
291 (other :tag "TAB key inserts TAB in literals, otherwise indents" other)) |
| 18720 | 292 :group 'c) |
| 293 | |
| 294 (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
|
295 "*Function used when inserting a tab for \\[c-indent-command]. |
| 18720 | 296 Only used when `c-tab-always-indent' indicates a `real' tab character |
| 297 should be inserted. Value must be a function taking no arguments." | |
| 298 :type 'function | |
| 299 :group 'c) | |
| 300 | |
|
30399
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
301 (defcustom c-syntactic-indentation t |
| 36920 | 302 "*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
|
303 |
|
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
|
304 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
|
305 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
|
306 |
|
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
307 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
|
308 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
|
309 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
|
310 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
|
311 e.g. `c-special-indent-hook'." |
|
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
312 :type 'boolean |
|
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
313 :group 'c) |
|
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
314 |
|
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
|
315 (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
|
316 "*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
|
317 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
|
318 `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
|
319 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
|
320 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
|
321 |
|
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
|
322 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
|
323 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
|
324 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
|
325 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
|
326 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
|
327 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
|
328 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
|
329 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
|
330 :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
|
331 :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
|
332 |
| 26817 | 333 (defcustom-c-stylevar c-comment-only-line-offset 0 |
| 18720 | 334 "*Extra offset for line which contains only the start of a comment. |
| 335 Can contain an integer or a cons cell of the form: | |
| 336 | |
| 337 (NON-ANCHORED-OFFSET . ANCHORED-OFFSET) | |
| 338 | |
| 339 Where NON-ANCHORED-OFFSET is the amount of offset given to | |
| 340 non-column-zero anchored comment-only lines, and ANCHORED-OFFSET is | |
| 341 the amount of offset to give column-zero anchored comment-only lines. | |
| 26817 | 342 Just an integer as value is equivalent to (<val> . -1000). |
| 343 | |
| 344 Note that this variable only has effect when the `c-lineup-comment' | |
| 345 lineup function is used on the `comment-intro' syntactic symbol (the | |
| 346 default)." | |
| 347 :type '(choice (integer :tag "Non-anchored offset" 0) | |
| 18720 | 348 (cons :tag "Non-anchored & anchored offset" |
| 349 :value (0 . 0) | |
| 350 (integer :tag "Non-anchored offset") | |
| 351 (integer :tag "Anchored offset"))) | |
| 352 :group 'c) | |
| 353 | |
|
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
|
354 (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
|
355 '((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
|
356 (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
|
357 (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
|
358 "*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
|
359 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
|
360 |
|
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
|
361 (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
|
362 |
|
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
|
363 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
|
364 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
|
365 |
|
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 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
|
367 |
|
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 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
|
369 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
|
370 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
|
371 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
|
372 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
|
373 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
|
374 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
|
375 |
|
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 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
|
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 (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
|
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 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
|
381 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
|
382 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
|
383 |
|
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 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
|
385 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
|
386 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
|
387 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
|
388 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
|
389 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
|
390 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
|
391 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
|
392 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
|
393 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
|
394 |
|
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 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
|
396 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
|
397 |
|
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 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
|
399 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
|
400 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
|
401 :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
|
402 (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
|
403 :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
|
404 :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
|
405 (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
|
406 (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
|
407 (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
|
408 :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
|
409 (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
|
410 (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
|
411 `(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
|
412 (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
|
413 `(cons :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
|
414 (c-const-symbol :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
|
415 :size 20 |
|
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 ,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
|
417 (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
|
418 :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
|
419 :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
|
420 ,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
|
421 ,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 (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
|
423 :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
|
424 (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
|
425 (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
|
426 :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
|
427 :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
|
428 ,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
|
429 ,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
|
430 '(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
|
431 :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
|
432 |
|
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 (defcustom-c-stylevar c-indent-comments-syntactically-p nil |
| 26817 | 434 "*Specifies how \\[indent-for-comment] should handle comment-only lines. |
| 18720 | 435 When this variable is non-nil, comment-only lines are indented |
| 26817 | 436 according to syntactic analysis via `c-offsets-alist'. Otherwise, the |
| 437 comment is indented as if it was preceded by code. Note that this | |
| 438 variable does not affect how the normal line indentation treats | |
| 439 comment-only lines." | |
| 18720 | 440 :type 'boolean |
| 441 :group 'c) | |
| 442 | |
| 36920 | 443 (make-obsolete-variable 'c-comment-continuation-stars |
| 444 'c-block-comment-prefix) | |
| 445 | |
| 446 ;; Although c-comment-continuation-stars is obsolete, we look at it in | |
| 447 ;; some places in CC Mode anyway, so make the compiler ignore it | |
| 448 ;; during our compilation. | |
| 449 (cc-bytecomp-obsolete-var c-comment-continuation-stars) | |
| 450 (cc-bytecomp-defvar c-comment-continuation-stars) | |
| 451 | |
| 26817 | 452 (defcustom-c-stylevar c-block-comment-prefix |
| 453 (if (boundp 'c-comment-continuation-stars) | |
| 454 c-comment-continuation-stars | |
| 455 "* ") | |
| 456 "*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
|
457 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
|
458 at the front of continued block style comment lines. This should |
| 26817 | 459 either be the empty string, or some characters without preceding |
| 460 spaces. To adjust the alignment under the comment starter, put an | |
| 461 appropriate value on the `c' syntactic symbol (see the | |
| 462 `c-offsets-alist' variable). | |
| 463 | |
| 464 It's only used when a one-line block comment is broken into two or | |
| 465 more lines for the first time; otherwise the appropriate prefix is | |
| 466 adapted from the comment. This variable is not used for C++ line | |
| 467 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
|
468 :type 'string |
|
19298
4a99e63dc4a9
(c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
19255
diff
changeset
|
469 :group 'c) |
|
4a99e63dc4a9
(c-buffer-is-cc-mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
19255
diff
changeset
|
470 |
| 36920 | 471 (defcustom-c-stylevar c-comment-prefix-regexp |
| 472 '((pike-mode . "//+!?\\|\\**") | |
| 473 (other . "//+\\|\\**")) | |
| 26817 | 474 "*Regexp to match the line prefix inside comments. |
| 475 This regexp is used to recognize the fill prefix inside comments for | |
| 476 correct paragraph filling and other things. | |
| 477 | |
| 36920 | 478 If this variable is a string, it will be used in all CC Mode major |
| 479 modes. It can also be an association list, to associate specific | |
| 480 regexps to specific major modes. The symbol for the major mode is | |
| 481 looked up in the association list, and its value is used as the line | |
| 482 prefix regexp. If it's not found, then the symbol `other' is looked | |
| 483 up and its value is used instead. | |
| 484 | |
| 485 The regexp should match the prefix used in both C++ style line | |
| 486 comments and C style block comments, but it does not need to match a | |
| 487 block comment starter. In other words, it should at least match | |
| 488 \"//\" for line comments and the string in `c-block-comment-prefix', | |
| 489 which is sometimes inserted by CC Mode inside block comments. It | |
| 490 should not match any surrounding whitespace. | |
| 26817 | 491 |
|
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
|
492 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
|
493 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
|
494 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
|
495 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
|
496 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
|
497 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
|
498 |
|
52609
ce6cc36ebb7c
(c-comment-prefix-regexp): Document that `c-setup-paragraph-variables'
Martin Stjernholm <mast@lysator.liu.se>
parents:
52401
diff
changeset
|
499 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
|
500 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
|
501 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
|
502 variable in a mode hook." |
| 36920 | 503 :type '(radio |
| 504 (regexp :tag "Regexp for all modes") | |
| 505 (list | |
| 506 :tag "Mode-specific regexps" | |
| 507 (set | |
| 508 :inline t :format "%v" | |
| 509 (cons :format "%v" | |
| 510 (const :format "C " c-mode) (regexp :format "%v")) | |
| 511 (cons :format "%v" | |
| 512 (const :format "C++ " c++-mode) (regexp :format "%v")) | |
| 513 (cons :format "%v" | |
| 514 (const :format "ObjC " objc-mode) (regexp :format "%v")) | |
| 515 (cons :format "%v" | |
| 516 (const :format "Java " java-mode) (regexp :format "%v")) | |
| 517 (cons :format "%v" | |
| 518 (const :format "IDL " idl-mode) (regexp :format "%v")) | |
| 519 (cons :format "%v" | |
| 520 (const :format "Pike " pike-mode) (regexp :format "%v"))) | |
| 521 (cons :format " %v" | |
| 522 (const :format "Other " other) (regexp :format "%v")))) | |
| 26817 | 523 :group 'c) |
| 524 | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
525 (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
|
526 '((java-mode . javadoc) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
527 (pike-mode . autodoc)) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
528 "*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
|
529 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
|
530 them, e.g. Javadoc comments. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
531 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
532 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
|
533 comment styles: |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
534 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
535 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
|
536 autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode). |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
537 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
538 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
|
539 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
|
540 that don't conflict). |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
541 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
542 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
|
543 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
|
544 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
|
545 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
|
546 `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
|
547 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
548 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
|
549 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
|
550 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
|
551 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
|
552 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
|
553 reinitialize. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
554 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
555 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
|
556 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
|
557 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
|
558 afterwards to redo that work." |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
559 ;; 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
|
560 ;; 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
|
561 ;; "-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
|
562 ;; 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
|
563 ;; the result is prepended. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
564 :type '(radio |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
565 (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
|
566 (list |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
567 :tag "Mode-specific doc styles" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
568 (set |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
569 :inline t :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
570 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
571 (const :format "C " c-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
572 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
573 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
574 (const :format "C++ " c++-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
575 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
576 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
577 (const :format "ObjC " objc-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
578 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
579 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
580 (const :format "Java " java-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
581 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
582 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
583 (const :format "IDL " idl-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
584 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
585 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
586 (const :format "Pike " pike-mode) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
587 (c-symbol-list :format "%v")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
588 (cons :format "%v" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
589 (const :format "Other " other) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
590 (c-symbol-list :format "%v"))))) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
591 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
592 |
| 26817 | 593 (defcustom c-ignore-auto-fill '(string cpp code) |
| 594 "*List of contexts in which automatic filling never occurs. | |
| 595 If Auto Fill mode is active, it will be temporarily disabled if point | |
| 596 is in any context on this list. It's e.g. useful to enable Auto Fill | |
| 597 in comments only, but not in strings or normal code. The valid | |
| 598 contexts are: | |
| 599 | |
| 600 string -- inside a string or character literal | |
| 601 c -- inside a C style block comment | |
| 602 c++ -- inside a C++ style line comment | |
| 603 cpp -- inside a preprocessor directive | |
| 604 code -- anywhere else, i.e. in normal code" | |
| 605 :type '(set | |
| 606 (const :tag "String literals" string) | |
| 607 (const :tag "C style block comments" c) | |
| 608 (const :tag "C++ style line comments" c++) | |
| 609 (const :tag "Preprocessor directives" cpp) | |
| 610 (const :tag "Normal code" code)) | |
| 611 :group 'c) | |
| 612 | |
| 613 (defcustom-c-stylevar c-cleanup-list '(scope-operator) | |
| 18720 | 614 "*List of various C/C++/ObjC constructs to \"clean up\". |
| 36920 | 615 The following clean ups only take place when the auto-newline feature |
| 616 is turned on, as evidenced by the `/a' or `/ah' appearing next to the | |
| 617 mode name: | |
| 18720 | 618 |
| 36920 | 619 brace-else-brace -- Clean up \"} else {\" constructs by placing |
| 620 entire construct on a single line. This clean | |
| 621 up only takes place when there is nothing but | |
| 18720 | 622 white space between the braces and the `else'. |
| 26817 | 623 Clean up occurs when the open brace after the |
| 18720 | 624 `else' is typed. |
| 36920 | 625 brace-elseif-brace -- Similar to brace-else-brace, but clean up |
| 626 \"} else if (...) {\" constructs. Clean up | |
| 627 occurs after the open parenthesis and the open | |
| 628 brace. | |
| 629 brace-catch-brace -- Similar to brace-elseif-brace, but clean up | |
| 630 \"} catch (...) {\" constructs. | |
| 631 empty-defun-braces -- Clean up empty defun braces by placing the | |
| 18720 | 632 braces on the same line. Clean up occurs when |
| 633 the defun closing brace is typed. | |
| 36920 | 634 defun-close-semi -- Clean up the terminating semi-colon on defuns |
| 18720 | 635 by placing the semi-colon on the same line as |
| 636 the closing brace. Clean up occurs when the | |
| 637 semi-colon is typed. | |
| 36920 | 638 list-close-comma -- Clean up commas following braces in array |
| 18720 | 639 and aggregate initializers. Clean up occurs |
| 640 when the comma is typed. | |
| 36920 | 641 scope-operator -- Clean up double colons which may designate |
| 18720 | 642 a C++ scope operator split across multiple |
| 36920 | 643 lines. Note that certain C++ constructs can |
| 18720 | 644 generate ambiguous situations. This clean up |
| 645 only takes place when there is nothing but | |
| 36920 | 646 whitespace between colons. Clean up occurs |
| 647 when the second colon is typed. | |
| 648 | |
| 649 The following clean ups always take place when they are on this list, | |
| 650 regardless of the auto-newline feature, since they typically don't | |
| 651 involve auto-newline inserted newlines: | |
| 652 | |
| 653 space-before-funcall -- Insert exactly one space before the opening | |
| 654 parenthesis of a function call. Clean up | |
| 655 occurs when the opening parenthesis is typed. | |
| 656 compact-empty-funcall -- Clean up any space before the function call | |
| 657 opening parenthesis if and only if the | |
| 658 argument list is empty. This is typically | |
| 659 useful together with `space-before-funcall' to | |
| 660 get the style \"foo (bar)\" and \"foo()\". | |
| 661 Clean up occurs when the closing parenthesis | |
| 662 is typed." | |
| 18720 | 663 :type '(set |
| 36920 | 664 (const :tag "Put \"} else {\" on one line" |
| 665 brace-else-brace) | |
| 666 (const :tag "Put \"} else if (...) {\" on one line" | |
| 667 brace-elseif-brace) | |
| 668 (const :tag "Put \"} catch (...) {\" on one line" | |
| 669 brace-catch-brace) | |
| 670 (const :tag "Put empty defun braces on one line" | |
| 671 empty-defun-braces) | |
| 672 (const :tag "Put \"};\" ending defuns on one line" | |
| 673 defun-close-semi) | |
| 674 (const :tag "Put \"},\" in aggregates on one line" | |
| 675 list-close-comma) | |
| 676 (const :tag "Put C++ style \"::\" on one line" | |
| 677 scope-operator) | |
| 678 (const :tag "Put a space before funcall parens, e.g. \"foo (bar)\"" | |
| 679 space-before-funcall) | |
| 680 (const :tag "Remove space before empty funcalls, e.g. \"foo()\"" | |
| 681 compact-empty-funcall)) | |
| 18720 | 682 :group 'c) |
| 683 | |
| 26817 | 684 (defcustom-c-stylevar c-hanging-braces-alist '((brace-list-open) |
| 685 (brace-entry-open) | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
686 (statement-cont) |
| 26817 | 687 (substatement-open after) |
| 688 (block-close . c-snug-do-while) | |
| 689 (extern-lang-open after) | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
690 (namespace-open after) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
691 (module-open after) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
692 (composition-open after) |
| 26817 | 693 (inexpr-class-open after) |
| 694 (inexpr-class-close before)) | |
| 695 "*Controls the insertion of newlines before and after braces | |
| 696 when the auto-newline feature is active. This variable contains an | |
| 697 association list with elements of the following form: | |
| 698 \(SYNTACTIC-SYMBOL . ACTION). | |
| 18720 | 699 |
| 700 When a brace (either opening or closing) is inserted, the syntactic | |
| 701 context it defines is looked up in this list, and if found, the | |
| 702 associated ACTION is used to determine where newlines are inserted. | |
| 703 If the context is not found, the default is to insert a newline both | |
| 704 before and after the brace. | |
| 705 | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
706 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
|
707 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
|
708 *-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
|
709 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
|
710 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
|
711 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
|
712 in Java. |
| 18720 | 713 |
| 714 ACTION can be either a function symbol or a list containing any | |
| 715 combination of the symbols `before' or `after'. If the list is empty, | |
| 716 no newlines are inserted either before or after the brace. | |
| 717 | |
| 718 When ACTION is a function symbol, the function is called with a two | |
| 719 arguments: the syntactic symbol for the brace and the buffer position | |
| 720 at which the brace was inserted. The function must return a list as | |
| 721 described in the preceding paragraph. Note that during the call to | |
| 722 the function, the variable `c-syntactic-context' is set to the entire | |
| 723 syntactic context for the brace line." | |
| 26817 | 724 :type |
| 725 `(set ,@(mapcar | |
| 726 (lambda (elt) | |
| 727 `(cons :format "%v" | |
| 728 (c-const-symbol :format "%v: " | |
| 729 :size 20 | |
| 730 :value ,elt) | |
| 731 (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
|
732 :value (before after) |
| 26817 | 733 (set :menu-tag "Before/after" |
| 734 :format "Newline %v brace\n" | |
| 735 (const :format "%v, " before) | |
| 736 (const :format "%v" after)) | |
| 737 (function :menu-tag "Function" | |
| 738 :format "Run function: %v" | |
| 739 :value c-)))) | |
| 740 '(defun-open defun-close | |
| 741 class-open class-close | |
| 742 inline-open inline-close | |
| 743 block-open block-close | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
744 statement-cont substatement-open statement-case-open |
| 26817 | 745 brace-list-open brace-list-close |
| 746 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
|
747 extern-lang-open extern-lang-close |
| 26817 | 748 namespace-open namespace-close |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
749 module-open module-close |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
750 composition-open composition-close |
| 26817 | 751 inexpr-class-open inexpr-class-close))) |
| 752 :group 'c) | |
| 18720 | 753 |
| 26817 | 754 (defcustom-c-stylevar c-hanging-colons-alist nil |
| 18720 | 755 "*Controls the insertion of newlines before and after certain colons. |
| 756 This variable contains an association list with elements of the | |
| 757 following form: (SYNTACTIC-SYMBOL . ACTION). | |
| 758 | |
| 759 SYNTACTIC-SYMBOL can be any of: case-label, label, access-label, | |
| 760 member-init-intro, or inher-intro. | |
| 761 | |
| 762 See the variable `c-hanging-braces-alist' for the semantics of this | |
| 763 variable. Note however that making ACTION a function symbol is | |
| 764 currently not supported for this variable." | |
| 26817 | 765 :type |
| 766 `(set ,@(mapcar | |
| 767 (lambda (elt) | |
| 768 `(cons :format "%v" | |
| 769 (c-const-symbol :format "%v: " | |
| 770 :size 20 | |
| 771 :value ,elt) | |
| 772 (set :format "Newline %v brace\n" | |
| 773 (const :format "%v, " before) | |
| 774 (const :format "%v" after)))) | |
| 775 '(case-label label access-label member-init-intro inher-intro))) | |
| 18720 | 776 :group 'c) |
| 777 | |
| 26817 | 778 (defcustom-c-stylevar c-hanging-semi&comma-criteria |
| 779 '(c-semi&comma-inside-parenlist) | |
| 18720 | 780 "*List of functions that decide whether to insert a newline or not. |
| 781 The functions in this list are called, in order, whenever the | |
| 782 auto-newline minor mode is activated (as evidenced by a `/a' or `/ah' | |
| 783 string in the mode line), and a semicolon or comma is typed (see | |
| 784 `c-electric-semi&comma'). Each function in this list is called with | |
| 785 no arguments, and should return one of the following values: | |
| 786 | |
| 787 nil -- no determination made, continue checking | |
| 788 'stop -- do not insert a newline, and stop checking | |
| 789 (anything else) -- insert a newline, and stop checking | |
| 790 | |
| 791 If every function in the list is called with no determination made, | |
| 792 then no newline is inserted." | |
| 793 :type '(repeat function) | |
| 794 :group 'c) | |
| 795 | |
| 26817 | 796 (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
|
797 "*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
|
798 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
|
799 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
|
800 macro exceeds this column then the next tab stop from that 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
|
801 used as alignment column instead." |
| 18720 | 802 :type 'integer |
| 803 :group 'c) | |
| 804 | |
|
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
|
805 (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
|
806 "*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
|
807 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
|
808 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
|
809 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
|
810 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
|
811 :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
|
812 :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
|
813 |
|
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
|
814 (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
|
815 "*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
|
816 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
|
817 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
|
818 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
|
819 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
|
820 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
|
821 :type 'boolean |
| 18720 | 822 :group 'c) |
| 823 | |
| 824 (defcustom c-backspace-function 'backward-delete-char-untabify | |
| 825 "*Function called by `c-electric-backspace' when deleting backwards." | |
| 826 :type 'function | |
| 827 :group 'c) | |
| 828 | |
| 829 (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
|
830 "*Function called by `c-electric-delete-forward' when deleting forwards." |
| 18720 | 831 :type 'function |
| 832 :group 'c) | |
| 833 | |
|
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
|
834 (defcustom c-require-final-newline |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
835 ;; C and C++ mandates that all nonempty files should end with a |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
836 ;; newline. Objective-C refers to C for all things it doesn'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
|
837 ;; specify, so the same holds there. The other languages does not |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
838 ;; 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
|
839 '((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
|
840 (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
|
841 (objc-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
|
842 "*Controls whether a final newline is ensured when the file is saved. |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
843 The value is an association list that for each language mode specifies |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
844 the value to give to `require-final-newline' at mode initialization; |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
845 see that variable for details about the value. If a language isn'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
|
846 present on the association list, CC Mode won't set |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
847 `require-final-newline' in buffers for that language." |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
848 :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
|
849 (const :format "C " c-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
850 (symbol :format "%v" :value ,require-final-newline)) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
851 (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
|
852 (const :format "C++ " c++-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
853 (symbol :format "%v" :value ,require-final-newline)) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
854 (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
|
855 (const :format "ObjC " objc-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
856 (symbol :format "%v" :value ,require-final-newline)) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
857 (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
|
858 (const :format "Java " java-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
859 (symbol :format "%v" :value ,require-final-newline)) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
860 (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
|
861 (const :format "IDL " idl-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
862 (symbol :format "%v" :value ,require-final-newline)) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
863 (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
|
864 (const :format "Pike " pike-mode) |
|
2c05c557df6c
(c-require-final-newline): Made this variable an alist to specify a value
Martin Stjernholm <mast@lysator.liu.se>
parents:
49479
diff
changeset
|
865 (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
|
866 :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
|
867 |
| 18720 | 868 (defcustom c-electric-pound-behavior nil |
| 869 "*List of behaviors for electric pound insertion. | |
| 870 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
|
871 :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
|
872 :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
|
873 |
|
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
|
874 (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
|
875 "*Hook for user defined special indentation adjustments. |
|
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
|
876 This hook gets called after a line is indented by the mode." |
|
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
|
877 :type 'hook |
| 18720 | 878 :group 'c) |
| 879 | |
| 26817 | 880 (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
|
881 "*Minimum indentation for lines inside code blocks. |
| 18720 | 882 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
|
883 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
|
884 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
|
885 `c-special-indent-hook' is what enforces this." |
| 18720 | 886 :type 'integer |
| 887 :group 'c) | |
| 888 | |
| 889 (defcustom c-progress-interval 5 | |
| 890 "*Interval used to update progress status during long re-indentation. | |
| 891 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
|
892 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
|
893 this variable to nil." |
| 18720 | 894 :type 'integer |
| 895 :group 'c) | |
| 896 | |
| 36920 | 897 (defcustom c-default-style '((java-mode . "java") (other . "gnu")) |
| 24282 | 898 "*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
|
899 |
|
9cffecf3b1ca
(c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
20144
diff
changeset
|
900 The value of this variable can be any style defined in |
| 24282 | 901 `c-style-alist', including styles you add. The value can also be an |
| 902 association list of major mode symbols to style names. | |
| 903 | |
| 904 When the value is a string, all CC Mode major modes will install this | |
| 36920 | 905 style by default. |
|
20919
9cffecf3b1ca
(c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
20144
diff
changeset
|
906 |
| 26817 | 907 When the value is an alist, the major mode symbol is looked up in it |
| 908 and the associated style is installed. If the major mode is not | |
| 909 listed in the alist, then the symbol `other' is looked up in it, and | |
| 910 if found, the style in that entry is used. If `other' is not found in | |
| 911 the alist, then \"gnu\" style is used. | |
| 912 | |
| 913 The default style gets installed before your mode hooks run, so you | |
| 914 can always override the use of `c-default-style' by making calls to | |
| 36920 | 915 `c-set-style' in the appropriate mode hook." |
| 26817 | 916 :type '(radio |
| 36920 | 917 (string :tag "Style in all modes") |
| 918 (set :tag "Mode-specific styles" | |
| 919 (cons :format "%v" | |
| 920 (const :format "C " c-mode) (string :format "%v")) | |
| 921 (cons :format "%v" | |
| 922 (const :format "C++ " c++-mode) (string :format "%v")) | |
| 923 (cons :format "%v" | |
| 924 (const :format "ObjC " objc-mode) (string :format "%v")) | |
| 925 (cons :format "%v" | |
| 926 (const :format "Java " java-mode) (string :format "%v")) | |
| 927 (cons :format "%v" | |
| 928 (const :format "IDL " idl-mode) (string :format "%v")) | |
| 929 (cons :format "%v" | |
| 930 (const :format "Pike " pike-mode) (string :format "%v")) | |
| 931 (cons :format "%v" | |
| 932 (const :format "Other " other) (string :format "%v")))) | |
| 26817 | 933 :group 'c) |
|
20919
9cffecf3b1ca
(c-enable-xemacs-performance-kludge-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
20144
diff
changeset
|
934 |
|
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
|
935 ;; *) 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
|
936 ;; 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
|
937 ;; 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
|
938 ;; 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
|
939 ;; 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
|
940 ;; 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
|
941 ;; 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
|
942 (c-set-stylevar-fallback 'c-offsets-alist |
| 26817 | 943 '((string . c-lineup-dont-change) |
| 944 ;; Relpos: Beg of previous line. | |
| 945 (c . c-lineup-C-comments) | |
| 946 ;; Relpos: Beg of the comment. | |
| 947 (defun-open . 0) | |
|
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
|
948 ;; Relpos: When inside a class: Boi at the func decl 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
|
949 ;; 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
|
950 ;; 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
|
951 ;; start(*). |
| 26817 | 952 (defun-close . 0) |
|
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
|
953 ;; Relpos: At the defun block open if it's at boi, otherwise |
|
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
|
954 ;; boi at the func decl start. |
| 26817 | 955 (defun-block-intro . +) |
|
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
|
956 ;; Relpos: At the block open(*). |
| 26817 | 957 (class-open . 0) |
| 958 ;; Relpos: Boi at the class decl start. | |
| 959 (class-close . 0) | |
| 960 ;; Relpos: Boi at the class decl start. | |
| 961 (inline-open . +) | |
| 962 ;; Relpos: None for functions (inclass got the relpos then), | |
| 963 ;; boi at the lambda start for lambdas. | |
| 964 (inline-close . 0) | |
|
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
|
965 ;; Relpos: Inexpr functions: At the lambda block open if it'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
|
966 ;; at boi, else at the statement(*) at boi of the start 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
|
967 ;; lambda construct. Otherwise: At the inline block open 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
|
968 ;; it's at boi, otherwise boi at the func decl start. |
| 26817 | 969 (func-decl-cont . +) |
| 970 ;; Relpos: Boi at the func decl start. | |
| 971 (knr-argdecl-intro . +) | |
|
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
|
972 ;; Relpos: Boi at the topmost intro line. |
| 26817 | 973 (knr-argdecl . 0) |
|
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
|
974 ;; Relpos: At the beginning of the first K&R argdecl. |
| 26817 | 975 (topmost-intro . 0) |
| 976 ;; Relpos: 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
|
977 (topmost-intro-cont . c-lineup-topmost-intro-cont) |
| 26817 | 978 ;; Relpos: Boi at the topmost intro line. |
| 979 (member-init-intro . +) | |
| 980 ;; Relpos: 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
|
981 (member-init-cont . c-lineup-multi-inher) |
| 26817 | 982 ;; Relpos: Beg of the first member init. |
| 983 (inher-intro . +) | |
|
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
|
984 ;; Relpos: Boi at the class decl start. |
| 26817 | 985 (inher-cont . c-lineup-multi-inher) |
| 986 ;; Relpos: Java: At the implements/extends keyword start. | |
| 987 ;; Otherwise: At the inher start colon, or boi at the class | |
| 988 ;; decl start if the first inherit clause hangs and it's not a | |
| 989 ;; func-local inherit clause (when does that occur?). | |
| 990 (block-open . 0) | |
|
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
|
991 ;; Relpos: Inexpr statement: At the statement(*) at boi 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
|
992 ;; start of the inexpr construct. Otherwise: None. |
| 26817 | 993 (block-close . 0) |
|
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
|
994 ;; Relpos: Inexpr statement: At the inexpr block open if it'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
|
995 ;; at boi, else at the statement(*) at boi of the start 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
|
996 ;; inexpr construct. Block hanging on a case/default label: At |
|
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
|
997 ;; the closest preceding label that starts at boi. Otherwise: |
|
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
|
998 ;; At the block open(*). |
| 26817 | 999 (brace-list-open . 0) |
| 1000 ;; Relpos: Boi at the brace list decl start, but a starting | |
| 1001 ;; "typedef" token is ignored. | |
| 1002 (brace-list-close . 0) | |
|
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
|
1003 ;; Relpos: At the brace list decl start(*). |
| 26817 | 1004 (brace-list-intro . +) |
|
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
|
1005 ;; Relpos: At the brace list decl start(*). |
| 26817 | 1006 (brace-list-entry . 0) |
| 1007 ;; Relpos: At the first non-ws char after the open paren if the | |
| 1008 ;; first token is on the same line, otherwise boi at that | |
| 1009 ;; token. | |
| 1010 (brace-entry-open . 0) | |
| 1011 ;; Relpos: Same as brace-list-entry. | |
| 1012 (statement . 0) | |
|
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
|
1013 ;; Relpos: After a `;' in the condition clause of a for |
| 26817 | 1014 ;; 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
|
1015 ;; Otherwise: At the preceding statement(*). |
| 26817 | 1016 (statement-cont . +) |
| 1017 ;; Relpos: After the first token in the condition clause of a | |
| 1018 ;; for 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
|
1019 ;; Otherwise: At the containing statement(*). |
| 26817 | 1020 (statement-block-intro . +) |
|
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
|
1021 ;; Relpos: In inexpr statement block: At the inexpr block open |
|
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 ;; if it's at boi, else at the statement(*) at boi of 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
|
1023 ;; of the inexpr construct. In a block hanging on 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
|
1024 ;; 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
|
1025 ;; 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
|
1026 ;; block(*). |
| 26817 | 1027 (statement-case-intro . +) |
|
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
|
1028 ;; Relpos: At the case/default label(*). |
| 26817 | 1029 (statement-case-open . 0) |
|
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
|
1030 ;; Relpos: At the case/default label(*). |
| 26817 | 1031 (substatement . +) |
|
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
|
1032 ;; Relpos: At the containing statement(*). |
| 26817 | 1033 (substatement-open . +) |
|
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
|
1034 ;; Relpos: At the containing statement(*). |
|
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 (substatement-label . 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
|
1036 ;; Relpos: At the containing statement(*). |
| 26817 | 1037 (case-label . 0) |
|
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
|
1038 ;; Relpos: At the start of the switch block(*). |
| 26817 | 1039 (access-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
|
1040 ;; Relpos: Same as inclass. |
| 26817 | 1041 (label . 2) |
|
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
|
1042 ;; Relpos: At the start of the containing block(*). |
| 26817 | 1043 (do-while-closure . 0) |
|
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
|
1044 ;; Relpos: At the corresponding while statement(*). |
| 26817 | 1045 (else-clause . 0) |
|
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
|
1046 ;; Relpos: At the corresponding if statement(*). |
| 26817 | 1047 (catch-clause . 0) |
|
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
|
1048 ;; Relpos: At the previous try or catch statement clause(*). |
|
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
|
1049 (comment-intro . (c-lineup-knr-region-comment c-lineup-comment)) |
| 26817 | 1050 ;; Relpos: None. |
| 1051 (arglist-intro . +) | |
|
30399
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
1052 ;; Relpos: Boi at the open paren, or at the first non-ws after |
|
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
1053 ;; the open paren of the surrounding sexp, whichever is later. |
|
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
|
1054 (arglist-cont . (c-lineup-gcc-asm-reg 0)) |
| 26817 | 1055 ;; Relpos: 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
|
1056 (arglist-cont-nonempty . (c-lineup-gcc-asm-reg c-lineup-arglist)) |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1057 ;; Relpos: At the containing statement(*). |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1058 ;; 2nd pos: At the open paren. |
| 26817 | 1059 (arglist-close . +) |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1060 ;; Relpos: At the containing statement(*). |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1061 ;; 2nd pos: At the open paren. |
| 26817 | 1062 (stream-op . c-lineup-streamop) |
| 1063 ;; Relpos: Boi at the first stream op in the statement. | |
| 1064 (inclass . +) | |
| 1065 ;; Relpos: At the class open brace if it's at boi, otherwise | |
| 1066 ;; boi at the class decl start. | |
| 36920 | 1067 (cpp-macro . [0]) |
|
30399
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
1068 ;; Relpos: 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
|
1069 (cpp-macro-cont . +) |
| 26817 | 1070 ;; Relpos: 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
|
1071 (cpp-define-intro . (c-lineup-cpp-define +)) |
|
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
|
1072 ;; Relpos: None. |
| 26817 | 1073 (friend . 0) |
| 1074 ;; Relpos: None. | |
| 36920 | 1075 (objc-method-intro . [0]) |
| 26817 | 1076 ;; Relpos: Boi. |
| 1077 (objc-method-args-cont . c-lineup-ObjC-method-args) | |
| 1078 ;; Relpos: At the method start (always at boi). | |
| 1079 (objc-method-call-cont . c-lineup-ObjC-method-call) | |
| 1080 ;; Relpos: At the open bracket. | |
| 1081 (extern-lang-open . 0) | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1082 (namespace-open . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1083 (module-open . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1084 (composition-open . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1085 ;; Relpos: Boi at the extern/namespace/etc keyword. |
| 26817 | 1086 (extern-lang-close . 0) |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1087 (namespace-close . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1088 (module-close . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1089 (composition-close . 0) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1090 ;; Relpos: Boi at the corresponding extern/namespace/etc keyword. |
| 26817 | 1091 (inextern-lang . +) |
| 1092 (innamespace . +) | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1093 (inmodule . +) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1094 (incomposition . +) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1095 ;; Relpos: At the extern/namespace/etc block open brace if it's |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1096 ;; at boi, otherwise boi at the keyword. |
| 26817 | 1097 (template-args-cont . (c-lineup-template-args +)) |
|
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
|
1098 ;; Relpos: Boi at the decl start. This might be changed; 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
|
1099 ;; logical position is clearly the opening '<'. |
| 26817 | 1100 (inlambda . c-lineup-inexpr-block) |
| 1101 ;; Relpos: None. | |
| 1102 (lambda-intro-cont . +) | |
| 1103 ;; Relpos: 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
|
1104 (inexpr-statement . +) |
| 26817 | 1105 ;; Relpos: None. |
| 1106 (inexpr-class . +) | |
| 1107 ;; Relpos: None. | |
| 1108 )) | |
| 1109 (defcustom c-offsets-alist nil | |
| 1110 "Association list of syntactic element symbols and indentation offsets. | |
| 1111 As described below, each cons cell in this list has the form: | |
| 24282 | 1112 |
| 26817 | 1113 (SYNTACTIC-SYMBOL . OFFSET) |
| 1114 | |
| 1115 When a line is indented, CC Mode first determines the syntactic | |
| 1116 context of it by generating a list of symbols called syntactic | |
| 1117 elements. This list can contain more than one syntactic element and | |
| 1118 the global variable `c-syntactic-context' contains the context list | |
| 1119 for the line being indented. Each element in this list is actually a | |
| 1120 cons cell of the syntactic symbol and a buffer position. This buffer | |
| 1121 position is called the relative indent point for the line. Some | |
| 1122 syntactic symbols may not have a relative indent point associated with | |
| 1123 them. | |
| 1124 | |
| 1125 After the syntactic context list for a line is generated, CC Mode | |
| 1126 calculates the absolute indentation for the line by looking at each | |
| 1127 syntactic element in the list. It compares the syntactic element | |
| 1128 against the SYNTACTIC-SYMBOL's in `c-offsets-alist'. When it finds a | |
| 1129 match, it adds the OFFSET to the column of the relative indent point. | |
| 1130 The sum of this calculation for each element in the syntactic list is | |
| 1131 the absolute offset for line being indented. | |
| 1132 | |
| 1133 If the syntactic element does not match any in the `c-offsets-alist', | |
| 36920 | 1134 the element is ignored. |
| 1135 | |
| 1136 If OFFSET is nil, the syntactic element is ignored in the offset | |
| 1137 calculation. | |
| 1138 | |
| 1139 If OFFSET is an integer, it's added to the relative indent. | |
| 1140 | |
| 1141 If OFFSET is one of the symbols `+', `-', `++', `--', `*', or `/', a | |
| 1142 positive or negative multiple of `c-basic-offset' is added; 1, -1, 2, | |
| 1143 -2, 0.5, and -0.5, respectively. | |
| 26817 | 1144 |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1145 If OFFSET is a vector, it's first element, which must be an integer, |
| 36920 | 1146 is used as an absolute indentation column. This overrides all |
| 1147 relative offsets. If there are several syntactic elements which | |
| 1148 evaluates to absolute indentation columns, the first one takes | |
| 1149 precedence. You can see in which order CC Mode combines the syntactic | |
| 1150 elements in a certain context by using \\[c-show-syntactic-information] on the line. | |
| 26817 | 1151 |
| 36920 | 1152 If OFFSET is a function, it's called with a single argument |
| 1153 containing the cons of the syntactic element symbol and the relative | |
| 1154 indent point. The return value from the function is then | |
| 1155 reinterpreted as an OFFSET value. | |
| 1156 | |
| 1157 If OFFSET is a list, it's recursively evaluated using the semantics | |
| 1158 described above. The first element of the list to return a non-nil | |
| 1159 value succeeds. If none of the elements returns a non-nil value, the | |
| 1160 syntactic element is ignored. | |
| 26817 | 1161 |
| 1162 `c-offsets-alist' is a style variable. This means that the offsets on | |
| 1163 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
|
1164 \(see `c-default-style' and `c-style-alist'). However, any offsets |
| 26817 | 1165 put explicitly on this list will override the style system when a CC |
| 1166 Mode buffer is initialized \(there is a variable | |
| 1167 `c-old-style-variable-behavior' that changes this, though). | |
| 1168 | |
| 1169 Here is the current list of valid syntactic element symbols: | |
| 1170 | |
| 1171 string -- Inside multi-line string. | |
| 1172 c -- Inside a multi-line C style block comment. | |
| 1173 defun-open -- Brace that opens a function definition. | |
| 1174 defun-close -- Brace that closes a function definition. | |
| 1175 defun-block-intro -- The first line in a top-level defun. | |
| 1176 class-open -- Brace that opens a class definition. | |
| 1177 class-close -- Brace that closes a class definition. | |
| 1178 inline-open -- Brace that opens an in-class inline method. | |
| 1179 inline-close -- Brace that closes an in-class inline method. | |
| 1180 func-decl-cont -- The region between a function definition's | |
| 1181 argument list and the function opening brace | |
| 1182 (excluding K&R argument declarations). In C, you | |
| 1183 cannot put anything but whitespace and comments | |
| 1184 between them; in C++ and Java, throws declarations | |
| 1185 and other things can appear in this context. | |
| 1186 knr-argdecl-intro -- First line of a K&R C argument declaration. | |
| 1187 knr-argdecl -- Subsequent lines in a K&R C argument declaration. | |
| 1188 topmost-intro -- The first line in a topmost construct definition. | |
| 1189 topmost-intro-cont -- Topmost definition continuation lines. | |
| 1190 member-init-intro -- First line in a member initialization list. | |
| 1191 member-init-cont -- Subsequent member initialization list lines. | |
| 1192 inher-intro -- First line of a multiple inheritance list. | |
| 1193 inher-cont -- Subsequent multiple inheritance lines. | |
| 1194 block-open -- Statement block open brace. | |
| 1195 block-close -- Statement block close brace. | |
| 1196 brace-list-open -- Open brace of an enum or static array list. | |
| 1197 brace-list-close -- Close brace of an enum or static array list. | |
| 1198 brace-list-intro -- First line in an enum or static array list. | |
| 1199 brace-list-entry -- Subsequent lines in an enum or static array list. | |
| 1200 brace-entry-open -- Subsequent lines in an enum or static array | |
| 1201 list that start with an open brace. | |
| 1202 statement -- A C (or like) statement. | |
| 1203 statement-cont -- A continuation of a C (or like) statement. | |
| 1204 statement-block-intro -- The first line in a new statement block. | |
| 1205 statement-case-intro -- The first line in a case \"block\". | |
| 1206 statement-case-open -- The first line in a case block starting with brace. | |
| 1207 substatement -- The first line after an if/while/for/do/else. | |
| 1208 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
|
1209 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
|
1210 case-label -- A \"case\" or \"default\" label. |
| 26817 | 1211 access-label -- C++ private/protected/public access label. |
| 1212 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
|
1213 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
|
1214 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
|
1215 catch-clause -- The \"catch\" or \"finally\" of a try/catch construct. |
| 26817 | 1216 comment-intro -- A line containing only a comment introduction. |
| 1217 arglist-intro -- The first line in an argument list. | |
| 1218 arglist-cont -- Subsequent argument list lines when no | |
| 1219 arguments follow on the same line as the | |
| 1220 arglist opening paren. | |
| 1221 arglist-cont-nonempty -- Subsequent argument list lines when at | |
| 1222 least one argument follows on the same | |
| 1223 line as the arglist opening paren. | |
| 1224 arglist-close -- The solo close paren of an argument list. | |
| 1225 stream-op -- Lines continuing a stream operator construct. | |
| 1226 inclass -- The construct is nested inside a class definition. | |
| 1227 Used together with e.g. `topmost-intro'. | |
| 1228 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
|
1229 cpp-macro-cont -- Inside a multi-line C preprocessor macro definition. |
| 26817 | 1230 friend -- A C++ friend declaration. |
| 1231 objc-method-intro -- The first line of an Objective-C method definition. | |
| 1232 objc-method-args-cont -- Lines continuing an Objective-C method definition. | |
| 1233 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
|
1234 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
|
1235 extern-lang-close -- Brace that closes an \"extern\" block. |
| 26817 | 1236 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
|
1237 but used inside \"extern\" blocks. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1238 namespace-open, namespace-close, innamespace |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1239 -- 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
|
1240 C++ \"namespace\" blocks. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1241 module-open, module-close, inmodule |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1242 -- 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
|
1243 CORBA IDL \"module\" blocks. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1244 composition-open, composition-close, incomposition |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1245 -- 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
|
1246 CORBA CIDL \"composition\" blocks. |
| 26817 | 1247 template-args-cont -- C++ template argument list continuations. |
| 1248 inlambda -- In the header or body of a lambda function. | |
| 1249 lambda-intro-cont -- Continuation of the header of a lambda function. | |
| 1250 inexpr-statement -- The statement is inside an expression. | |
| 1251 inexpr-class -- The class is inside an expression. Used e.g. for | |
| 1252 Java anonymous classes." | |
| 1253 :type | |
| 1254 `(set :format "%{%t%}: | |
| 1255 Override style setting | |
| 1256 | Syntax Offset | |
| 1257 %v" | |
| 1258 ,@(mapcar | |
| 1259 (lambda (elt) | |
| 1260 `(cons :format "%v" | |
| 1261 :value ,elt | |
| 1262 (c-const-symbol :format "%v: " | |
| 1263 :size 25) | |
| 1264 (sexp :format "%v" | |
| 1265 :validate | |
| 1266 (lambda (widget) | |
| 1267 (unless (c-valid-offset (widget-value widget)) | |
| 1268 (widget-put widget :error "Invalid offset") | |
| 1269 widget))))) | |
| 1270 (get 'c-offsets-alist 'c-stylevar-fallback))) | |
| 18720 | 1271 :group 'c) |
| 1272 | |
|
53073
49f65e04ba8e
CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents:
52609
diff
changeset
|
1273 ;; 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
|
1274 ;; `c-gnu-impose-minimum'. |
|
49f65e04ba8e
CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents:
52609
diff
changeset
|
1275 (defconst c-inside-block-syms |
|
49f65e04ba8e
CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents:
52609
diff
changeset
|
1276 '(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
|
1277 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
|
1278 substatement substatement-open substatement-label case-label label |
|
49f65e04ba8e
CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents:
52609
diff
changeset
|
1279 do-while-closure else-clause catch-clause inlambda)) |
|
49f65e04ba8e
CC Mode update (5.30.8).
Martin Stjernholm <mast@lysator.liu.se>
parents:
52609
diff
changeset
|
1280 |
|
30399
7b0a7b155fe2
(c-style-variables-are-local-p): Incompatible
Gerd Moellmann <gerd@gnu.org>
parents:
26817
diff
changeset
|
1281 (defcustom c-style-variables-are-local-p t |
| 18720 | 1282 "*Whether style variables should be buffer local by default. |
| 1283 If non-nil, then all indentation style related variables will be made | |
| 1284 buffer local by default. If nil, they will remain global. Variables | |
| 1285 are made buffer local when this file is loaded, and once buffer | |
| 1286 localized, they cannot be made global again. | |
| 1287 | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1288 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
|
1289 |
| 18720 | 1290 The list of variables to buffer localize are: |
| 1291 c-basic-offset | |
| 1292 c-comment-only-line-offset | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1293 c-indent-comment-alist |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1294 c-indent-comments-syntactically-p |
| 26817 | 1295 c-block-comment-prefix |
| 1296 c-comment-prefix-regexp | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1297 c-doc-comment-style |
| 18720 | 1298 c-cleanup-list |
| 1299 c-hanging-braces-alist | |
| 1300 c-hanging-colons-alist | |
| 26817 | 1301 c-hanging-semi&comma-criteria |
| 18720 | 1302 c-backslash-column |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1303 c-backslash-max-column |
| 18720 | 1304 c-label-minimum-indentation |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1305 c-offsets-alist |
| 18720 | 1306 c-special-indent-hook |
| 1307 c-indentation-style" | |
| 1308 :type 'boolean | |
| 1309 :group 'c) | |
| 1310 | |
| 1311 (defcustom c-mode-hook nil | |
| 1312 "*Hook called by `c-mode'." | |
| 26817 | 1313 :type 'hook |
| 18720 | 1314 :group 'c) |
| 1315 | |
| 1316 (defcustom c++-mode-hook nil | |
| 1317 "*Hook called by `c++-mode'." | |
| 1318 :type 'hook | |
| 1319 :group 'c) | |
| 1320 | |
| 1321 (defcustom objc-mode-hook nil | |
| 1322 "*Hook called by `objc-mode'." | |
| 1323 :type 'hook | |
| 1324 :group 'c) | |
| 1325 | |
| 1326 (defcustom java-mode-hook nil | |
| 1327 "*Hook called by `java-mode'." | |
| 1328 :type 'hook | |
| 1329 :group 'c) | |
| 1330 | |
|
19255
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1331 (defcustom idl-mode-hook nil |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1332 "*Hook called by `idl-mode'." |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1333 :type 'hook |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1334 :group 'c) |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1335 |
| 26817 | 1336 (defcustom pike-mode-hook nil |
| 1337 "*Hook called by `pike-mode'." | |
| 1338 :type 'hook | |
| 1339 :group 'c) | |
| 1340 | |
| 18720 | 1341 (defcustom c-mode-common-hook nil |
| 1342 "*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
|
1343 :type 'hook |
| 18720 | 1344 :group 'c) |
| 1345 | |
|
19255
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1346 (defcustom c-initialization-hook nil |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1347 "*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
|
1348 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
|
1349 `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
|
1350 :type 'hook |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1351 :group 'c) |
|
40a9475f22ea
(idl-mode-hook): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
18848
diff
changeset
|
1352 |
| 24282 | 1353 (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
|
1354 "*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
|
1355 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
|
1356 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
|
1357 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
|
1358 styles that conform to the Emacs recommendation of putting these |
| 24282 | 1359 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
|
1360 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
|
1361 :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
|
1362 :group 'c) |
| 18720 | 1363 |
|
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
|
1364 (defvar c-old-style-variable-behavior nil |
| 26817 | 1365 "*Enables the old style variable behavior when non-nil. |
| 1366 | |
| 1367 Normally the values of the style variables will override the style | |
| 1368 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
|
1369 `c-style-alist'. However, in CC Mode 5.25 and earlier, it was the |
| 26817 | 1370 other way around, meaning that changes made to the style variables |
| 1371 from e.g. Customize would not take effect unless special precautions | |
| 1372 were taken. That was confusing, especially for novice users. | |
| 1373 | |
| 1374 It's believed that despite this change, the new behavior will still | |
| 1375 produce the same results for most old CC Mode configurations, since | |
| 1376 all style variables are per default set in a special non-override | |
| 1377 state. Set this variable only if your configuration has stopped | |
| 1378 working due to this change.") | |
| 1379 | |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1380 (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
|
1381 "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
|
1382 :args '((const :tag "none" nil) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1383 (repeat :tag "types" regexp))) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1384 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1385 (eval-and-compile |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1386 ;; XEmacs 19 evaluates this at compile time below, while most other |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1387 ;; versions delays the evaluation until the package is loaded. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1388 (defun c-make-font-lock-extra-types-blurb (mode1 mode2 example) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1389 (concat "\ |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1390 *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
|
1391 mode1 " mode. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1392 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
|
1393 " example " |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1394 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1395 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
|
1396 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
|
1397 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
|
1398 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
|
1399 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
|
1400 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1401 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
|
1402 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
|
1403 by doing \\[" mode2 "]. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1404 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1405 Despite the name, this variable is not only used for font locking but |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1406 also elsewhere in CC Mode to tell types from other identifiers."))) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1407 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1408 ;; Note: Most of the variables below are also defined in font-lock.el |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1409 ;; in older versions in Emacs, so depending on the load order we might |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1410 ;; 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
|
1411 ;; (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
|
1412 ;; values work fairly well anyway. |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1413 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1414 (defcustom c-font-lock-extra-types |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1415 '("FILE" "\\sw+_t" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1416 "bool" "complex" "imaginary" ; Defined in C99. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1417 ;; 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
|
1418 ;; 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
|
1419 ;; 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
|
1420 ;; 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
|
1421 "Lisp_Object") |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1422 (c-make-font-lock-extra-types-blurb "C" "c-mode" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1423 "For example, a value of (\"FILE\" \"\\\\sw+_t\") means the word FILE |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1424 and words ending in _t are treated as type names.") |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1425 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1426 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1427 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1428 (defcustom c++-font-lock-extra-types |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1429 '("\\sw+_t" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1430 "\\([iof]\\|str\\)+stream\\(buf\\)?" "ios" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1431 "string" "rope" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1432 "list" "slist" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1433 "deque" "vector" "bit_vector" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1434 "set" "multiset" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1435 "map" "multimap" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1436 "hash\\(_\\(m\\(ap\\|ulti\\(map\\|set\\)\\)\\|set\\)\\)?" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1437 "stack" "queue" "priority_queue" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1438 "type_info" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1439 "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
|
1440 "reference" "const_reference") |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1441 (c-make-font-lock-extra-types-blurb "C++" "c++-mode" |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1442 "For example, a value of (\"string\") means the word string is treated |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1443 as a type name.") |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1444 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1445 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1446 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1447 (defcustom objc-font-lock-extra-types |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1448 (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
|
1449 (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
|
1450 "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
|
1451 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
|
1452 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
|
1453 names).")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1454 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1455 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1456 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1457 (defcustom java-font-lock-extra-types |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1458 (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
|
1459 (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
|
1460 "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
|
1461 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
|
1462 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
|
1463 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1464 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1465 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1466 (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
|
1467 (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
|
1468 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1469 :group 'c) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1470 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1471 (defcustom pike-font-lock-extra-types |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1472 (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
|
1473 (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
|
1474 "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
|
1475 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
|
1476 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
|
1477 names).")) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1478 :type 'c-extra-types-widget |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1479 :group 'c) |
| 26817 | 1480 |
| 18720 | 1481 |
| 1482 ;; Non-customizable variables, still part of the interface to CC Mode | |
| 1483 (defvar c-file-style nil | |
| 1484 "Variable interface for setting style via File Local Variables. | |
| 1485 In a file's Local Variable section, you can set this variable to a | |
| 1486 string suitable for `c-set-style'. When the file is visited, CC Mode | |
| 1487 will set the style of the file to this value automatically. | |
| 1488 | |
| 1489 Note that file style settings are applied before file offset settings | |
| 1490 as designated in the variable `c-file-offsets'.") | |
| 26817 | 1491 (make-variable-buffer-local 'c-file-style) |
| 18720 | 1492 |
| 1493 (defvar c-file-offsets nil | |
| 1494 "Variable interface for setting offsets via File Local Variables. | |
| 1495 In a file's Local Variable section, you can set this variable to an | |
| 1496 association list similar to the values allowed in `c-offsets-alist'. | |
| 1497 When the file is visited, CC Mode will institute these offset settings | |
| 1498 automatically. | |
| 1499 | |
| 1500 Note that file offset settings are applied after file style settings | |
| 1501 as designated in the variable `c-file-style'.") | |
| 26817 | 1502 (make-variable-buffer-local 'c-file-offsets) |
| 18720 | 1503 |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1504 ;; It isn't possible to specify a docstring without specifying an |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1505 ;; initial value with `defvar', so the following two variables have |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1506 ;; only doc comments even though they are part of the API. It's |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1507 ;; really good not to have an initial value for variables like these |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1508 ;; that always should be dynamically bound, so it's worth the |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1509 ;; inconvenience. |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1510 |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1511 (cc-bytecomp-defvar c-syntactic-context) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1512 (defvar c-syntactic-context) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1513 ;; Variable containing the syntactic analysis list during indentation. |
|
51949
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1514 ;; It is a list with one element for each found syntactic symbol. See |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1515 ;; `c-syntactic-element' for further info. |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1516 ;; |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1517 ;; This is always bound dynamically. It should never be set |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1518 ;; statically (e.g. with `setq'). |
|
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 (cc-bytecomp-defvar c-syntactic-element) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1521 (defvar c-syntactic-element) |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1522 ;; Variable containing the info regarding the current syntactic |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1523 ;; element during calls to the lineup functions. The value is one of |
|
51949
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1524 ;; the elements in the list in `c-syntactic-context' and is a list |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1525 ;; with the symbol name in the first position, followed by zero or |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1526 ;; more elements containing any additional info associated with the |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1527 ;; syntactic symbol. There are accessor functions `c-langelem-sym', |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1528 ;; `c-langelem-pos', `c-langelem-col', and `c-langelem-2nd-pos' to |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1529 ;; access the list. |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1530 ;; |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1531 ;; Specifically, the element returned by `c-langelem-pos' is the |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1532 ;; relpos (a.k.a. anchor position), or nil if there isn't any. See |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1533 ;; the comments in the `c-offsets-alist' variable for more detailed |
|
bc247bdc17d4
#Updated to 5.30.4.
Martin Stjernholm <mast@lysator.liu.se>
parents:
51714
diff
changeset
|
1534 ;; info about the data each syntactic symbol provides. |
|
51714
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1535 ;; |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1536 ;; This is always bound dynamically. It should never be set |
|
bc91cbf50c24
Updated CC Mode to version 5.30.
Martin Stjernholm <mast@lysator.liu.se>
parents:
49857
diff
changeset
|
1537 ;; statically (e.g. with `setq'). |
| 18720 | 1538 |
| 26817 | 1539 (defvar c-indentation-style nil |
| 36920 | 1540 "Name of the currently installed style. |
| 1541 Don't change this directly; call `c-set-style' instead.") | |
| 18720 | 1542 |
| 36920 | 1543 (defvar c-current-comment-prefix nil |
| 1544 "The current comment prefix regexp. | |
| 1545 Set from `c-comment-prefix-regexp' at mode initialization.") | |
| 1546 (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
|
1547 |
| 18720 | 1548 |
| 36920 | 1549 (cc-provide 'cc-vars) |
|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Jan?k <Pavel@Janik.cz>
parents:
36920
diff
changeset
|
1550 |
| 52401 | 1551 ;;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9 |
| 18720 | 1552 ;;; cc-vars.el ends here |
