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: Vaidheeswaran C
Subject: Re: While editing a CMake file, how to turn off smart indentation?
Date: Fri, 17 Jul 2015 11:22:10 +0530
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0

On Thursday 16 July 2015 12:53 PM, Yaron Cohen-Tal wrote:

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

You may have to help yourself.

A quick look at the .el file suggests, that you have to focus on these
lines:

    ;; Indentation increment.
    225 ;;
    226 (defvar cmake-tab-width 2)

    ; Setup indentation function.
    254   (make-local-variable 'indent-line-function)
    255   (setq indent-line-function 'cmake-indent)


A good way to understand elisp code, is by just focusing on the
comments in source code or if you are adventurous, look at the elisp
code as though it is a non-native speaker of English trying to make
itself understood to you.





reply via email to

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