Problem
You want to force emacs to use tabs instead of always replacing everything with spaces.I admit it, i'm a tab nazi. I like tabs and would rather indentation done with tabs than spaces. It's annoying as hell to have to hit back-space 8 times just to move the cursor back one indent level. Plus, i think that the default emacs auto-indentation is usually not how i format my code (i.e. 2-spaces per indentation level when i normally use 1-tab=8-spaces).
Solution
Make emacs insert an actual TAB character when you hit the TAB key rather than "indent"ing the line. I've used this solution with '', but i dont see any reason why it shouldn't work with more modes.Edit your .emacs file
Place the following lines in your ~/.emacs file:;; Turn on tabs
(setq indent-tabs-mode t)
(setq-default indent-tabs-mode t)
;; Bind the TAB key
(global-set-key (kbd "TAB") 'self-insert-command)
;; Set the tab width
(setq default-tab-width 4)
(setq tab-width 4)
(setq c-basic-indent 4)