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: Wed, 19 Mar 2014 21:46:03 -0400 Message-ID: References: <20140228195051.GA3446@acm.acm> <20140302115118.GA3768@acm.acm> <20140308225820.GB2726@acm.acm> <20140309123711.GA2615@acm.acm> <20140316223509.GD3854@acm.acm> <20140319224231.GB4783@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395279975 1201 80.91.229.3 (20 Mar 2014 01:46:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2014 01:46:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 20 02:46:24 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 1WQS3q-00046J-KO for ged-emacs-devel@m.gmane.org; Thu, 20 Mar 2014 02:46:22 +0100 Original-Received: from localhost ([::1]:44701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQS3q-0007wh-4s for ged-emacs-devel@m.gmane.org; Wed, 19 Mar 2014 21:46:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQS3f-0007lx-V2 for emacs-devel@gnu.org; Wed, 19 Mar 2014 21:46:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQS3Y-0003EB-KZ for emacs-devel@gnu.org; Wed, 19 Mar 2014 21:46:11 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:33697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQS3Y-0003E4-GX for emacs-devel@gnu.org; Wed, 19 Mar 2014 21:46:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDjhiWYoFegxM X-IPAS-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDjhiWYoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52699382" Original-Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.160]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Mar 2014 21:46:03 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4987D60123; Wed, 19 Mar 2014 21:46:03 -0400 (EDT) In-Reply-To: <20140319224231.GB4783@acm.acm> (Alan Mackenzie's message of "Wed, 19 Mar 2014 22:42:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:170588 Archived-At: >> And the same holds true for all other programming modes. > No it doesn't. We both agree that Emacs Lisp Mode has no use whatsoever > for electric indentation. No, I don't agree. First because most people don't use C-j but use RET instead, and second because typing text linearly is far from being the only important editing pattern. > Then I suggest you think hard about the disadvantages of RET as an > electric indentation key. If there weren't such disadvantages, CC Mode > would have been using it for 20 years. I need your help here, I'm afraid. And I'm obviously not the only, because it's very common for text editors to "auto-indent on RET" (either by default, or via a config setting). >> There are details about *how* e-i-m works which depend on the mode. >> Yes. That's why e-i-m has mode-local settings (e.g. which keys are >> electric, or whether the indentation algorithm can reliably reindent). > Any "indentation algorithm" can reliably reindent. No: python-mode, haskell-mode, and coffeescript-mode can't. > Clearly. I am pointing out that this definition is perhaps a suboptimal > one. I don't see what you mean by "definition" not "suboptimal". > Your scheme makes it difficult for a user to set up a major mode as > being non e-i-m, or even an individual buffer. How so? > Not even that. You were in so much of a hurry to reinvent the wheel, > that you were oblivious of perfectly round wheels with smooth bearings > which had been in existence for ~20 years. No, I know those wheels very well, because I suffered through many of them. The problem is they're not modular: your rebinding of ?{ to make it auto-indent means that my global binding of ?{ to make it auto-pair doesn't work in c-mode. Stefan