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
.
Customizations can shadow (setq tab width 4)
so either use setq-default
or let Customize know what you're doing. I also had issues similar to the OP and fixed it with this alone, did not need to adjust tab-stop-list
or any insert
functions:
(custom-set-variables
'(tab-width 4 't)
)
Found it useful to add this immediately after (a tip from emacsWiki):
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)