I'm fairly new to aquamacs/emacs and while editing I noticed that it indents however it wants. In order to indent the way I want I end up using M-i, but that is pretty cumbersome. So, how do I make the TAB key behave like M-i (that is, inserting 4 spaces whenever I press it, regardless of the type of file I am editing)?
You can find out the command that is executed by
C-h k M-i
and bind it to
(global-set-key (kbd "TAB") #'tab-to-tab-stop)
However, this will set the global binding, while you are most likely concerned with the binding of one or more global modes:
(add-hook c-mode-common-hook #'(lambda () (local-set-key (kbd "TAB" #'tab-to-tab-stop))))
But perhaps it would be better if you could describe what are your issues with Emacs' indentation (in a different question), so we can help you solve that.