From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vaidheeswaran C Newsgroups: gmane.emacs.help Subject: Re: While editing a CMake file, how to turn off smart indentation? Date: Fri, 17 Jul 2015 11:22:10 +0530 Message-ID: <55A8980A.1080205@gmail.com> References: Reply-To: vaidheeswaran.chinnaraju@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437112351 27592 80.91.229.3 (17 Jul 2015 05:52:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jul 2015 05:52:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 17 07:52:23 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFyZJ-00014t-EZ for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Jul 2015 07:52:21 +0200 Original-Received: from localhost ([::1]:42860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFyZI-0006as-L1 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Jul 2015 01:52:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFyZ8-0006ah-8F for help-gnu-emacs@gnu.org; Fri, 17 Jul 2015 01:52:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFyZ4-0008I4-7u for help-gnu-emacs@gnu.org; Fri, 17 Jul 2015 01:52:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFyZ4-0008Hn-0T for help-gnu-emacs@gnu.org; Fri, 17 Jul 2015 01:52:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZFyZ2-0000xN-9C for help-gnu-emacs@gnu.org; Fri, 17 Jul 2015 07:52:04 +0200 Original-Received: from 106.216.162.24 ([106.216.162.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jul 2015 07:52:04 +0200 Original-Received: from vaidheeswaran.chinnaraju by 106.216.162.24 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jul 2015 07:52:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 106.216.162.24 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105772 Archived-At: 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.