handle the paragraph filling. That's done at mode initialization or
when you switch to a style which sets this variable. Thus, if you
change it in some other way, e.g. interactively in a CC Mode buffer,
-you will need to do \\[c-mode] (or whatever mode you're currently
-using) to reinitialize.
+you will need to do \\[c-setup-paragraph-variables] afterwards so that
+the other variables are updated with the new value.
-Note also that when CC Mode starts up, the other variables are
-modified before the mode hooks are run. If you change this variable
-in a mode hook, you can call `c-setup-paragraph-variables' afterwards
-to redo it."
+Note also that when CC Mode starts up, all variables are initialized
+before the mode hooks are run. It's therefore necessary to make a
+call to `c-setup-paragraph-variables' explicitly if you change this
+variable in a mode hook."
:type '(radio
(regexp :tag "Regexp for all modes")
(list
:group 'c)
(defcustom-c-stylevar c-label-minimum-indentation 1
- "*Minimum indentation for lines inside of top-level constructs.
+ "*Minimum indentation for lines inside code blocks.
This variable typically only affects code using the `gnu' style, which
-mandates a minimum of one space in front of every line inside
-top-level constructs. Specifically, the function
-`c-gnu-impose-minimum' on your `c-special-indent-hook' is what
-enforces this."
+mandates a minimum of one space in front of every line inside code
+blocks. Specifically, the function `c-gnu-impose-minimum' on your
+`c-special-indent-hook' is what enforces this."
:type 'integer
:group 'c)
(get 'c-offsets-alist 'c-stylevar-fallback)))
:group 'c)
+;; The syntactic symbols that can occur inside code blocks. Used by
+;; `c-gnu-impose-minimum'.
+(defconst c-inside-block-syms
+ '(defun-block-intro block-open block-close statement statement-cont
+ statement-block-intro statement-case-intro statement-case-open
+ substatement substatement-open substatement-label case-label label
+ do-while-closure else-clause catch-clause inlambda))
+
(defcustom c-style-variables-are-local-p t
"*Whether style variables should be buffer local by default.
If non-nil, then all indentation style related variables will be made
working due to this change.")
(define-widget 'c-extra-types-widget 'radio
- ;; Widget for a list of regexps for the extra types.
+ "Internal CC Mode widget for the `*-font-lock-extra-types' variables."
:args '((const :tag "none" nil)
(repeat :tag "types" regexp)))
;; in older versions in Emacs, so depending on the load order we might
;; not install the values below. There's no kludge to cope with this
;; (as opposed to the *-font-lock-keywords-* variables) since the old
-;; values works fairly well anyway.
+;; values work fairly well anyway.
(defcustom c-font-lock-extra-types
'("FILE" "\\sw+_t"
(cc-bytecomp-defvar c-syntactic-context)
(defvar c-syntactic-context)
;; Variable containing the syntactic analysis list during indentation.
-;; It is a list with one element for each found syntactic symbol.
-;; Each element is a list with the symbol name in the first position,
-;; followed by zero or more elements containing any additional info
-;; associated with the syntactic symbol. Specifically, the second
-;; element is the relpos (a.k.a. anchor position), or nil if there
-;; isn't any. See the comments in the `c-offsets-alist' variable for
-;; more detailed info about the data each syntactic symbol provides.
-;;
+;; It is a list with one element for each found syntactic symbol. See
+;; `c-syntactic-element' for further info.
+;;
;; This is always bound dynamically. It should never be set
;; statically (e.g. with `setq').
(defvar c-syntactic-element)
;; Variable containing the info regarding the current syntactic
;; element during calls to the lineup functions. The value is one of
-;; the elements in the list in `c-syntactic-context'.
+;; the elements in the list in `c-syntactic-context' and is a list
+;; with the symbol name in the first position, followed by zero or
+;; more elements containing any additional info associated with the
+;; syntactic symbol. There are accessor functions `c-langelem-sym',
+;; `c-langelem-pos', `c-langelem-col', and `c-langelem-2nd-pos' to
+;; access the list.
+;;
+;; Specifically, the element returned by `c-langelem-pos' is the
+;; relpos (a.k.a. anchor position), or nil if there isn't any. See
+;; the comments in the `c-offsets-alist' variable for more detailed
+;; info about the data each syntactic symbol provides.
;;
;; This is always bound dynamically. It should never be set
;; statically (e.g. with `setq').
'1-bit)
list)))
- (let ((buf (generate-new-buffer "test"))
+ (let ((buf (generate-new-buffer " test"))
parse-sexp-lookup-properties
parse-sexp-ignore-comments
lookup-syntax-properties)
\f
(cc-provide 'cc-vars)
+;;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9
;;; cc-vars.el ends here