From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: While editing a CMake file, how to turn off smart indentation? Date: Sat, 18 Jul 2015 12:18:43 -0700 Message-ID: References: <87a8uuz7d2.fsf@nl106-137-147.student.uu.se> <87zj2ufgzr.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1437247158 28877 80.91.229.3 (18 Jul 2015 19:19:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 19:19:18 +0000 (UTC) Cc: Yaron Cohen-Tal To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 21:19:15 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 1ZGXdh-0003ai-WB for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 21:19:14 +0200 Original-Received: from localhost ([::1]:49452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGXdh-0002sy-9k for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 15:19:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGXdX-0002sr-T5 for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 15:19:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGXdX-0007PI-3s for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 15:19:03 -0400 Original-Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:35887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGXdW-0007PD-Uk for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 15:19:03 -0400 Original-Received: by obnw1 with SMTP id w1so82558048obn.3 for ; Sat, 18 Jul 2015 12:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=A1OeEvcT7ITsylewr4XsQ/J1Ci/EQaa0a2rJrkM10uo=; b=GpJP3pbuz/trNGUGViS9wa8G5hnR21tDh04W4+CLVun4PXdyPOYCeR3zr1yZF8sMQU 5pxQ6XzfgkmDkhpAYGNp/psX07bZ4nvPg8+iAxHLqYgtWbNA753obQlvSgbguVVqe+ed yBqnU9gFk5RG5/x0c7Fz+1KXn5eDyQlh1e0VsDvJW0hzOKAUB193fQZ8ET4jc93G1gA+ 2fFZAeUZK2xQmA2la8CMp29oo9mwG38NgkDQtol68XFzOZ9aDGKcCCVpX+cCN563NMDx qk9k3WdQNp5N7y2u1z2RPPn2oihQksHwXME0goS/qS8EZpDzsx2ZQVXyofTGRjQezSot WcdA== X-Received: by 10.60.37.166 with SMTP id z6mr18898323oej.63.1437247142551; Sat, 18 Jul 2015 12:19:02 -0700 (PDT) Original-Received: by 10.76.168.70 with HTTP; Sat, 18 Jul 2015 12:18:43 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::230 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:105814 Archived-At: > 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