Indent Automatically In Emacs

This is what I've been using:

C-x h TAB

The `C-x h` is for `mark-whole-buffer` which is basically select all.

There are other ways to do it to, but that's working for me in EmacsLisp