help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: While editing a CMake file, how to turn off smart indentation?


From: John Mastro
Subject: Re: While editing a CMake file, how to turn off smart indentation?
Date: Sat, 18 Jul 2015 12:18:43 -0700

> The shortcuts to (un)indent 4 spaces work perfectly. What I still don't
> manage is to make "RET" simply start a new line with indentation identical
> to the previous line. In C++ mode I arranged it so behave this way. I tried
> changing the code in "cmake-mode.el" from:

Try this (in your init file; no need to modify cmake-mode.el):

    (defun my-set-relative-indent ()
      (setq-local indent-line-function #'indent-relative))

    (add-hook 'cmake-mode-hook #'my-set-relative-indent)

-- 
john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]