Variable: indent-line-function
indent-line-function is a variable defined in indent.el.gz.
Documentation
Function to indent the current line.
This function will be called with no arguments.
If it is called somewhere where it cannot auto-indent, the function
should return noindent to signal that it didn't.
Setting this function is all you need to make TAB indent appropriately.
Don't rebind TAB unless you really need to.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defvar indent-line-function 'indent-relative
"Function to indent the current line.
This function will be called with no arguments.
If it is called somewhere where it cannot auto-indent, the function
should return `noindent' to signal that it didn't.
Setting this function is all you need to make TAB indent appropriately.
Don't rebind TAB unless you really need to.")