c-insert-tab-function

c-insert-tab-function is a variable defined in `cc-vars.el'.
Its value is
insert-tab

  • This variable may be risky if used as a file-local variable.

Documentation:
*Function used when inserting a tab for M-x c-indent-command.
Only used when `c-tab-always-indent' indicates a `real' tab character
should be inserted. Value must be a function taking no arguments.
The default, `insert-tab', inserts either a tab or the equivalent
number of spaces depending on the value of `indent-tabs-mode'.

You can customize this variable.