tab-always-indent tweaks the behavior of the
indent-for-tab-command) command. The default value,
t, gives the behavior described in Indentation. If you
change the value to the symbol
complete, then <TAB> first
tries to indent the current line, and if the line was already
indented, it tries to complete the text at point (see Symbol Completion). If the value is
nil, then <TAB> indents the
current line only if point is at the left margin or in the line's
indentation; otherwise, it inserts a tab character.
Electric Indent mode is a global minor mode that automatically indents the line after every <RET> you type. To toggle this minor mode, type M-x electric-indent-mode.