From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Fiocca Newsgroups: gmane.emacs.help Subject: Re: Why flip RET and C-j with electric-indent-mode? Date: Mon, 6 Jun 2016 13:23:32 -0400 Message-ID: <8f661893-8947-1c79-b12e-8b8e81b7dd2b@gmail.com> References: <20141128153825244895059@bob.proulx.com> <83tx1ila1w.fsf@gnu.org> <604600ef-4fdb-46ad-b7c8-30625ac303d1@googlegroups.com> <20160603173908736387648@bob.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1465236842 13412 80.91.229.3 (6 Jun 2016 18:14:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jun 2016 18:14:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 06 20:13:58 2016 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 1b9z2E-0007wm-58 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Jun 2016 20:13:58 +0200 Original-Received: from localhost ([::1]:44420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9z2A-0001nP-72 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Jun 2016 14:13:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9yFa-0000wy-4N for help-gnu-emacs@gnu.org; Mon, 06 Jun 2016 13:23:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9yFV-0006jZ-R3 for help-gnu-emacs@gnu.org; Mon, 06 Jun 2016 13:23:41 -0400 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:34254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9yFV-0006jV-Jl for help-gnu-emacs@gnu.org; Mon, 06 Jun 2016 13:23:37 -0400 Original-Received: by mail-pf0-x234.google.com with SMTP id 62so68784154pfd.1 for ; Mon, 06 Jun 2016 10:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=COAe3OVmuL2ogxdWrs/ZGOoGnYuBakSu+upuS0b6KRw=; b=ZnReIkGAswSRGb6vvR5VD9PdusQZ0RpF7I8i2msnmeXQM3g0kxRZu+CCiGAjlOWPyp CjW1REvOPPqgMtiwopm0zPeW/J2CAGfyQMAAzewtX+iqHdO7I6SBQpZ2Rx5ISHrXMl/e UIuZdkS+l2WPu6pb3tGnzbFMZMX/GIg5+2NzmLeHr5k0TMNirCmtYY7iyZSSx7N5l+la tOmPgL7pQ99iU9TNCeO36BES3nOGwTRc459EHJATNq23o4hXZ6K9m1dH/4HYFxaRiyS4 Iuuppotl9P/e93fUhZpDkkgSJxxOYqsrepS60ipefO+O2s7J5kKcUTD8iInAeocFGvT0 lKjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=COAe3OVmuL2ogxdWrs/ZGOoGnYuBakSu+upuS0b6KRw=; b=D7Jc4/EYW1M5qfSgVfAwhyx1yyK60SIvfzgjNZaT2V17hW3XMzYn7m6XHBp5F+POcd n+udAy8eWupfn/6rrdJ744hNlDbbQY9Pz0xeUs9RTkJwOxnC73voCumGtJ6ahuL4L63/ i14LWBeGrtvK2g1k5ATfB8bXQkapLbgUC7we2WNykB4YbZ+USgW7HoHE0R7O6XrORCg6 s3SJkiGPr6kSwVkSzp/r6/LYv4JNG8iDsJsD1jTjILnmy28lPPlmYH256yeuRGsWnnsF Uyc2yHpFgvQdsEpKf/pd35xFe3FrmWZtIyY2uWDvqxcTGes/AvKoS2t1n9SHreywEsDF mNwQ== X-Gm-Message-State: ALyK8tLd3pVwkCMdEWaSJBKNzVcpyoJxZA9fpmtgwvBi/yirKCO42ev2ly+95vy9aYZORg== X-Received: by 10.98.64.21 with SMTP id n21mr26575083pfa.161.1465233816714; Mon, 06 Jun 2016 10:23:36 -0700 (PDT) Original-Received: from [157.254.178.140] ([157.254.178.140]) by smtp.googlemail.com with ESMTPSA id vy8sm26697961pab.22.2016.06.06.10.23.35 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2016 10:23:36 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 In-Reply-To: <20160603173908736387648@bob.proulx.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::234 X-Mailman-Approved-At: Mon, 06 Jun 2016 14:13:27 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110340 Archived-At: Bob, I am using C and C++ programming modes. Previously whenever I typed an open curly brace, it would automatically indent to the correct column. Now, with electric-indent-mode nil, it just stays at column 1. This has nothing to do with RET or ctrl-J. Funny thing is, if I turn electric-indent-mode on and then off while in a C-mode buffer, it works fine. I just can't automate it. Something wrong with the timing of turning it off globally or turning it off in my c-mode-hook in .emacs. Thanks, Jim On 6/3/2016 7:41 PM, Bob Proulx wrote: > jfiocca0@gmail.com wrote: >>> (setq electric-indent-mode nil) ; new in 24, default is t, breaks RET/C-j >> For me, that does not completely revert the behavior back to the old >> way. It does not automatically indent curly braces like it used to. >> How can I get back to the old way + auto-indent C curly braces? > I have noticed this too. But I haven't figured out the details yet. > > Could you say what programming mode you are using? There are many > with curly braces. And could you describe more precisely which action > is different? Is using C-j instead of Enter acceptable? > > Bob