From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478. Date: Mon, 24 Mar 2014 14:32:05 -0400 Message-ID: References: <20140308225820.GB2726@acm.acm> <20140309123711.GA2615@acm.acm> <20140316223509.GD3854@acm.acm> <20140319224231.GB4783@acm.acm> <20140322131350.GA3163@acm.acm> <20140322231012.GB3562@acm.acm> <87wqfkgk02.fsf@uwakimon.sk.tsukuba.ac.jp> <871txsge04.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395685939 5278 80.91.229.3 (24 Mar 2014 18:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2014 18:32:19 +0000 (UTC) Cc: Alan Mackenzie , "Stephen J. Turnbull" , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 24 19:32:26 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WS9fd-0000Bi-8X for ged-emacs-devel@m.gmane.org; Mon, 24 Mar 2014 19:32:25 +0100 Original-Received: from localhost ([::1]:37911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS9fc-0001y0-MR for ged-emacs-devel@m.gmane.org; Mon, 24 Mar 2014 14:32:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS9fT-0001xh-Aq for emacs-devel@gnu.org; Mon, 24 Mar 2014 14:32:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WS9fM-0003j1-0o for emacs-devel@gnu.org; Mon, 24 Mar 2014 14:32:15 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:60521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS9fL-0003iv-RT for emacs-devel@gnu.org; Mon, 24 Mar 2014 14:32:07 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s2OIWNoc020630; Mon, 24 Mar 2014 14:32:24 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 59F5F6012F; Mon, 24 Mar 2014 14:32:05 -0400 (EDT) In-Reply-To: <871txsge04.fsf@yandex.ru> (Dmitry Gutov's message of "Mon, 24 Mar 2014 11:08:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered SUBJ_END_HASH_PTRN=0.2, RV4891=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4891> : inlines <639> : streams <1143957> : uri <1708671> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170925 Archived-At: > FWIW, effectively doing `reindent-then-newline-and-indent' on RET also > seems gratuitous to me. When I reach the end of a line, usually text on > that line is already indented correctly (automatically, or through me > typing TAB manually), You might get used to "RET reindents" and stop hitting TAB that often ;-) For me one of the reasons why it's not gratuitous is because of things like: begin blabla blibli end Go to just before "blibli" and type "end RET": notice that hitting TAB just before RET won't help you, because you need to reindent the line after the newline is inserted. This is admittedly less serious for interactive editing than for keyboard macros (and templates/skeletons/snippets), but I find the behavior to be handy. > The modes where reindenting the current line on RET is beneficial often, > can add `?\n' to electric-indent-chars themselves. Indeed, we could do that. > For most, the benefits are marginal and they are offset by having to > tweak `electric-indent-inhibit' or > `electric-indent-functions-without-reindent' for existing > text-based modes. Good point. > For all others, just swapping C-j and RET bindings would've worked just > as well, and I think it would result in simpler code. Again "just swapping" sounds simple, but I'm not sure what patch you have in mind. I think it's important for the user to be able to easily say something like (electric-indent-mode -1) (and/or its buffer-local equivalent) to recover the Emacs-23 behavior. Stefan