From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#15478: cc-mode does not obey electric-indent-mode Date: Sat, 05 Oct 2013 21:10:01 -0400 Message-ID: References: <20130928201147.GC11317@acm.acm> <20130929091017.GA3161@acm.acm> <20131002200737.GA3895@acm.acm> <524CDA92.1030107@dancol.org> <20131003094543.GA3211@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381021946 20728 80.91.229.3 (6 Oct 2013 01:12:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Oct 2013 01:12:26 +0000 (UTC) Cc: gnu-emacs-bug@moderators.isc.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 06 03:12:28 2013 Return-path: Envelope-to: geb-bug-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 1VSctW-0001yH-Jc for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2013 03:12:27 +0200 Original-Received: from localhost ([::1]:53429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSctV-0001mV-Gx for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2013 21:12:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSctI-0001lP-Ms for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:12:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSct8-0003bM-S6 for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:12:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSct8-0003bI-PS for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VSct8-00034S-IQ for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Oct 2013 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.138102189911771 (code B ref -1); Sun, 06 Oct 2013 01:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Oct 2013 01:11:39 +0000 Original-Received: from localhost ([127.0.0.1]:56864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VScsk-00033n-K3 for submit@debbugs.gnu.org; Sat, 05 Oct 2013 21:11:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57803) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VScsi-00033e-6i for submit@debbugs.gnu.org; Sat, 05 Oct 2013 21:11:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VScsY-0003Yt-1L for submit@debbugs.gnu.org; Sat, 05 Oct 2013 21:11:35 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VScsX-0003Yn-U6 for submit@debbugs.gnu.org; Sat, 05 Oct 2013 21:11:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VScsP-0001jz-Qk for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:11:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VScsH-0003DO-Om for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:11:17 -0400 Original-Received: from moderators.individual.net ([130.133.4.7]:59242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VScsH-0003DG-Hw for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2013 21:11:09 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by moderators.individual.net (Exim 4.80.1) for gnu-emacs-bug@moderators.isc.org with esmtp (envelope-from ) id <1VScsG-000WBt-Sk>; Sun, 06 Oct 2013 03:11:09 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34845010" Original-Received: from 206-248-175-45.dsl.teksavvy.com (HELO pastel.home) ([206.248.175.45]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Oct 2013 21:06:30 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0CA9C6050E; Sat, 5 Oct 2013 21:10:02 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sat, 5 Oct 2013 17:06:46 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78948 Archived-At: > The default for CC Mode must be on, otherwise automatic indentation > is broken. IIUC your notion of "automatic indentation" is that the text is kept indented without the user hitting TAB, just as a side-effect of editing the text. Emacs has never provided this feature in any mode that I know, cc-mode included. Some major modes (such as CC-mode) try to provide some vague approximation of it, using "electric keys" that trigger indentation "often enough" that it works more or less OK in some common cases. But while CC-mode has been doing that for "ever", it's not nearly as important as you claim, as demonstrated by all the other major modes that don't even try to do that. *You* like this feature, and indeed you're not alone. But it has nothing to do with the language being edited (other than the fact that the language doesn't make it completely impossible, as is the case in Python). For people who don't like electric-indent-mode, CC-mode's c-electric-flag sucks just as much. > > Please, let's keep this bug-report's focus: making cc-mode obey > > electric-indent-mode. Discussion of default setting of > > electric-indent-mode belongs elsewhere. > These two things are inextricably entangled. No they're not. And I think it's blatantly obvious, even to you. I understand that simply to mean that you do not want CC-mode's default behavior to change. So, for the sake of it, from here on, let's please continue this discussion under the premise that electric-indent-mode will be enabled by default. The core is then: how should we make cc-mode integrate better with Emacs and use the generic electric-*-mode functionality instead of rolling its own. For the record: CC-mode is not the only major mode in this boat. I've already converted several major modes to use electric-indent-mode, and for some of them this also involved changing the default behavior. I delayed touching at cc-mode mostly because I know you're very opinionated ;-) Stefan