From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 6c3842e 2/6: Add scala-mode to excluded-modes (#88) Date: Wed, 12 Oct 2016 18:07:58 -0400 Message-ID: References: <20161012191324.23934.59986@vcs.savannah.gnu.org> <20161012191324.8A15C220170@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476314659 13418 195.159.176.226 (12 Oct 2016 23:24:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 23:24:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Xairi , emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 13 01:24:14 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buSsP-0000il-KK for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2016 01:23:57 +0200 Original-Received: from localhost ([::1]:36366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSsN-0003We-2M for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2016 19:23:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSlQ-0006MU-OV for emacs-devel@gnu.org; Wed, 12 Oct 2016 19:16:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buSlN-0001NH-5P for emacs-devel@gnu.org; Wed, 12 Oct 2016 19:16:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:57298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSlN-0001Mu-14 for emacs-devel@gnu.org; Wed, 12 Oct 2016 19:16:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DyAQALW9BX/+mRs2tdGgEBAQECAQEBAYMtAQEBAQEeV4N2hVCEZasRggMkhXIEAgKBaTkUAQIBAQEBAQEBXieEYgEBAwFWIwULCw4mEhQYDSSIVQgOvEcBAQEBBgIBHwWKfYocBZlZhiKSa4YLkEseNoRsIIYKAQEB X-IPAS-Result: A0DyAQALW9BX/+mRs2tdGgEBAQECAQEBAYMtAQEBAQEeV4N2hVCEZasRggMkhXIEAgKBaTkUAQIBAQEBAQEBXieEYgEBAwFWIwULCw4mEhQYDSSIVQgOvEcBAQEBBgIBHwWKfYocBZlZhiKSa4YLkEseNoRsIIYKAQEB X-IronPort-AV: E=Sophos;i="5.30,296,1470715200"; d="scan'208";a="275400444" Original-Received: from 107-179-145-233.cpe.teksavvy.com (HELO pastel.home) ([107.179.145.233]) by smtp.teksavvy.com with ESMTP; 12 Oct 2016 19:16:39 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7987F605F7; Wed, 12 Oct 2016 18:07:58 -0400 (EDT) In-Reply-To: (Artur Malabarba's message of "Wed, 12 Oct 2016 18:05:43 -0300") 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.21 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" Xref: news.gmane.org gmane.emacs.devel:208193 Archived-At: > Scala-mode was added because it takes the liberty of doing some > whitespace cleanup during indent-region, so it was preventing users > from typing properly. See: > https://github.com/Malabarba/aggressive-indent-mode/issues/87 BTW, another way to avoid this problem is to skip reindentation if (and (eolp) (memq (char-before) '(?\s ?\t))). >> E.g. maybe some of those modes shouldn't use aggressive-indent simply >> because auto-reindentation can't be done reliably (in which case, >> aggressive-indent could check something like electric-indent-inhibit >> which was introduced for the same kind of needs)... > Yes. A lot of these are there for this reason, and we could use > `electric-indent-inhibit` for that (I didn't know about it). Maybe we should have another variable that's not bound to electric-indent, something like `indent-is-not-reliable'. > Other modes are there because indentation makes no sense for them at > all. Such as shell-mode, which I see doesn't set > electric-indent-inhibit. AFAIK shell-mode's indentation works just fine and reliably. Maybe you don't need it when you write 2-line scripts, but for larger scripts (such as https://gitlab.com/monnier/bugit/blob/master/bugit), it makes just as much sense as for any other programming language. > from prog-mode. Now that I have the advantage of hindsight, I see it > would have been easier to restrict to prog-mode and implement a > white-list, instead of taking everything and implementing a > black-list. electric-indent does OK with a black list, so maybe it was not such a bad decision. Stefan