From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#15478: cc-mode does not obey electric-indent-mode Date: Wed, 9 Oct 2013 17:55:44 +0000 Message-ID: <20131009175544.GB2610@acm.acm> References: <20131002200737.GA3895@acm.acm> <20131003105600.GB3211@acm.acm> <20131005165034.GA2943@acm.acm> <20131007131122.GC3859@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1381341502 28426 80.91.229.3 (9 Oct 2013 17:58:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2013 17:58:22 +0000 (UTC) Cc: 15478@debbugs.gnu.org To: Josh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 19:58:24 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 1VTy1f-0004N5-ES for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2013 19:58:23 +0200 Original-Received: from localhost ([::1]:43133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTy1f-0000bZ-2c for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2013 13:58:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTy1W-0000Zg-CI for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 13:58:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTy1Q-0006fJ-LJ for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 13:58:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTy1K-0006dV-Bw; Wed, 09 Oct 2013 13:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VTy1J-0003C9-MD; Wed, 09 Oct 2013 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 09 Oct 2013 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15478 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 15478-submit@debbugs.gnu.org id=B15478.138134146012246 (code B ref 15478); Wed, 09 Oct 2013 17:58:01 +0000 Original-Received: (at 15478) by debbugs.gnu.org; 9 Oct 2013 17:57:40 +0000 Original-Received: from localhost ([127.0.0.1]:38254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTy0w-0003BM-Et for submit@debbugs.gnu.org; Wed, 09 Oct 2013 13:57:39 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61495 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTy0t-0003B9-8D for 15478@debbugs.gnu.org; Wed, 09 Oct 2013 13:57:36 -0400 Original-Received: (qmail 86804 invoked by uid 3782); 9 Oct 2013 17:57:34 -0000 Original-Received: from acm.muc.de (pD95199FA.dip0.t-ipconnect.de [217.81.153.250]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 09 Oct 2013 19:57:33 +0200 Original-Received: (qmail 3166 invoked by uid 1000); 9 Oct 2013 17:55:44 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:79104 Archived-At: Hi, Josh. On Mon, Oct 07, 2013 at 02:23:20PM -0700, Josh wrote: > On Mon, Oct 7, 2013 at 6:11 AM, Alan Mackenzie wrote: > > > (or c-force-electric-flag electric-layout-mode electric-indent-mode) > > That's not going to gain anything, since `c-force-electric-flag' would > > need to default to t to preserve existing behaviour. > The need to preserve existing behavior is not a given. No, but there haven't been arguments that CC Mode's default for electric indentation is wrong, and there certainly hasn't been a bug report saying that. Users seem to be happy about the current default. I'm convinced that electric indentation switched on is the right default for CC Mode, for the same reasons that gave rise to its invention in the first place, in all probability. > The above change would cause the (initial) enablement of electric > behavior in CC Mode to be predicated on global electricity enablement, > which is the subject of this bug. > > > .... Even so, it would be a vast improvement for newbies who do not > > > want this behavior. > > Yes, but it would be undesirable for those other newbies who do want > > automatic indentation. "Newby" here means those unfamiliar with > > `c-toggle-electric-state' and `electric-indent-mode'. > Identifying the right set of defaults is important and likely to be an > extensive discussion in itself, but one that should take place as part > of some other bug. This bug is about the fact that CC Mode disregards > configuration that is documented to be global. But the solution is not to disregard other bits of documented configuration instead. Local, specific configurations generally supersede global, general configurations. -- Alan Mackenzie (Nuremberg, Germany).