I just want each line to get the same indentation as the previous line, and that TAB would indent 4 spaces. For C++ I managed it with:
(setq-default indent-tabs-mode nil)
(setq-default c-syntactic-indentation nil)
(setq-default c-basic-offset 4)
In my .emacs
, but for CMake files Emacs just indents the lines automatically according to its own rules, and TAB has no effect at all.