Controlling indent / offset for CMake in emacs

I am using cmake mode which I thought came out of cc-mode (ed: comments below show this was wrong). For some reason my padding (like in the if () block) comes out as 2 spaces, even though my c-base offset is set to 4. Does anyone know what / how to control this?

For example:

if( foo )
  set( a "bar" )
endif()

      

+3


source to share


1 answer


The indentation for cmake-mode

appears to be controlled by the variable cmake-tab-width

. You can customize it like this:



(setq cmake-tab-width 4)

      

+6


source







All Articles