let b:did_indent = 1
setlocal indentexpr=CMakeGetIndent(v:lnum)
-setlocal indentkeys+=0=~ENDIF(,0=~ENDFOREACH(,0=~ENDMACRO(,0=~ELSE(,0=~ELSEIF(,0=~ENDWHILE(
+setlocal indentkeys+=0=~ENDIF(,0=~ENDFOREACH(,0=~ENDMACRO(,0=~ENDFUNCTION(,0=~ELSE(,0=~ELSEIF(,0=~ENDWHILE(
" Only define the function once.
if exists("*CMakeGetIndent")