Variable: c-tab-always-indent
c-tab-always-indent is a customizable variable defined in
cc-vars.el.gz.
Value
t
Documentation
Controls the operation of the TAB key.
If t, hitting TAB always just indents the current line. If nil, hitting
TAB indents the current line if point is at the left margin or in the
line's indentation, otherwise it inserts a real tab character (see
note). If some other value (not nil or t), then tab is inserted only
within literals (comments and strings), but the line is always
reindented.
Note: The value of indent-tabs-mode(var)/indent-tabs-mode(fun) will determine whether a real
tab character will be inserted, or the equivalent number of spaces.
When inserting a tab, actually the function stored in the variable
c-insert-tab-function is called.
Note: indentation of lines containing only comments is also controlled
by the c-comment-only-line-offset variable.
Probably introduced at or before Emacs version 18.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
;;;###autoload(put 'c-basic-offset 'safe-local-variable 'integerp)
(defcustom c-tab-always-indent t
"Controls the operation of the TAB key.
If t, hitting TAB always just indents the current line. If nil, hitting
TAB indents the current line if point is at the left margin or in the
line's indentation, otherwise it inserts a `real' tab character (see
note). If some other value (not nil or t), then tab is inserted only
within literals (comments and strings), but the line is always
reindented.
Note: The value of `indent-tabs-mode' will determine whether a real
tab character will be inserted, or the equivalent number of spaces.
When inserting a tab, actually the function stored in the variable
`c-insert-tab-function' is called.
Note: indentation of lines containing only comments is also controlled
by the `c-comment-only-line-offset' variable."
:type '(radio
(const :tag "TAB key always indents, never inserts TAB" t)
(const :tag "TAB key indents in left margin, otherwise inserts TAB" nil)
(other :tag "TAB key inserts TAB in literals, otherwise indents" other))
:group 'c)