From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yaron Cohen-Tal Newsgroups: gmane.emacs.help Subject: Re: While editing a CMake file, how to turn off smart indentation? Date: Sun, 19 Jul 2015 20:35:13 +0300 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 1437327335 27184 80.91.229.3 (19 Jul 2015 17:35:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2015 17:35:35 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 19 19:35:30 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 1ZGsUs-0007I1-7s for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Jul 2015 19:35:30 +0200 Original-Received: from localhost ([::1]:52289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGsUr-0006T8-79 for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Jul 2015 13:35:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGsUe-0006T3-Do for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 13:35:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGsUb-0001rz-NV for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 13:35:16 -0400 Original-Received: from mail-vn0-x236.google.com ([2607:f8b0:400c:c0f::236]:35110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGsUb-0001rd-Jb for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 13:35:13 -0400 Original-Received: by vnaa140 with SMTP id a140so16243625vna.2 for ; Sun, 19 Jul 2015 10:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z18pO3Pm42eV7HjVQQ7tc0FGDGw9bfnU0gCCRF7XENA=; b=PCo1cQIJqaztnuxyVsVMg976u1HGDfLeDtU5UA2jzemYTVYLzTwV8A6WXfVeefzzvQ JmcWCM5m3Rg90SgbZvOYPBYPSbnH/Z/3y01spxLyns63OWUjKg3fU7iqTbA54ustIpAI V3UwqRNxuSEy2D/LNpz26A71j8ut/r4gCtTHvx5J6FT1Q71T7Hgdnpul3BmKzvX4LUos WvL4NM3XHMfA+bjRN1/YilJzahxrI1jQ/fMiIWaCxrBwHfkpbs+Rx6zcBx9BwIb/l8ww yFMRJAtZz1/jz0PtgNvtDiVUC6vNhk133dfrJUM3eBr4HFmgwjVqWfuuPacGA0hIPKsQ pWew== X-Received: by 10.52.14.200 with SMTP id r8mr31027638vdc.79.1437327313161; Sun, 19 Jul 2015 10:35:13 -0700 (PDT) Original-Received: by 10.31.70.193 with HTTP; Sun, 19 Jul 2015 10:35:13 -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:400c:c0f::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:105854 Archived-At: That did the trick, thanx! On Sat, Jul 18, 2015 at 10:18 PM, John Mastro 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 >