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: Yaron Cohen-Tal
Subject: Re: While editing a CMake file, how to turn off smart indentation?
Date: Sun, 19 Jul 2015 20:35:13 +0300

That did the trick, thanx!

On Sat, Jul 18, 2015 at 10:18 PM, John Mastro <john.b.mastro@gmail.com>
wrote:

> > 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]