Variable: c-basic-offset

c-basic-offset is a customizable and buffer-local variable defined in cc-vars.el.gz.

Documentation

Amount of basic offset used by + and - symbols in c-offsets-alist.

Also used as the indentation step when c-syntactic-indentation is nil.

This is a style variable. Apart from the valid values described above, it can be set to the symbol set-from-style. In that case, it takes its value from the style system (see c-default-style and c-style-alist) when a CC Mode buffer is initialized. Otherwise, the value set here overrides the style system (there is a variable c-old-style-variable-behavior that changes this, though).

Probably introduced at or before Emacs version 19.23.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
(defcustom-c-stylevar c-basic-offset 4
  "Amount of basic offset used by + and - symbols in `c-offsets-alist'.
Also used as the indentation step when `c-syntactic-indentation' is
nil."
  :type 'integer
  :group 'c)