I\'ve been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the TAB in buffers with the major mode text-mode
.
Just changing the style with c-set-style was enough for me.
From my init file, different because I wanted spaces instead of tabs:
(add-hook 'sql-mode-hook (lambda () (progn (setq-default tab-width 4) (setq indent-tabs-mode nil) (setq indent-line-function 'tab-to-tab-stop) (modify-syntax-entry ?_ "w") ; now '_' is not considered a word-delimiter (modify-syntax-entry ?- "w") ; now '-' is not considered a word-delimiter )))