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: Thu, 3 Oct 2013 09:45:43 +0000 Message-ID: <20131003094543.GA3211@acm.acm> References: <20130928201147.GC11317@acm.acm> <20130929091017.GA3161@acm.acm> <20131002200737.GA3895@acm.acm> <524CDA92.1030107@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1380793702 12276 80.91.229.3 (3 Oct 2013 09:48:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Oct 2013 09:48:22 +0000 (UTC) Cc: 15478@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 03 11:48: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 1VRfW9-0000fv-Kw for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Oct 2013 11:48:22 +0200 Original-Received: from localhost ([::1]:41860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRfW9-0004Jp-2y for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Oct 2013 05:48:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRfVy-0004JL-I0 for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2013 05:48:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRfVq-0001r7-Hs for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2013 05:48:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRfVq-0001qx-ET for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2013 05:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VRfVq-0007Ib-0D for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2013 05:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2013 09:48:01 +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 15478-submit@debbugs.gnu.org id=B15478.138079365528025 (code B ref 15478); Thu, 03 Oct 2013 09:48:01 +0000 Original-Received: (at 15478) by debbugs.gnu.org; 3 Oct 2013 09:47:35 +0000 Original-Received: from localhost ([127.0.0.1]:51355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRfVP-0007Hx-6s for submit@debbugs.gnu.org; Thu, 03 Oct 2013 05:47:35 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61749 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRfVM-0007Hm-9h for 15478@debbugs.gnu.org; Thu, 03 Oct 2013 05:47:33 -0400 Original-Received: (qmail 54125 invoked by uid 3782); 3 Oct 2013 09:47:30 -0000 Original-Received: from acm.muc.de (pD951A7BB.dip0.t-ipconnect.de [217.81.167.187]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 03 Oct 2013 11:47:29 +0200 Original-Received: (qmail 3333 invoked by uid 1000); 3 Oct 2013 09:45:43 -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:78884 Archived-At: On Thu, Oct 03, 2013 at 12:10:16AM -0400, Stefan Monnier wrote: > >> That's because *you* like electric-indent-mode. Not because C is special. > > Electric indentation is more useful in a language like C than it is in > > something like Python --- C has a richer set of brace characters. > Right: Python is indeed special because fully automatic indentation is > not really possible. But C is not special in this respect. I.e., electric indentation needs to be off in Python. > > cc-mode's sophisticated syntactic indentation is an Emacs "killer feature". > The "sophisticated syntactic indentation" is also a killer feature for > Octave users, SML users, Lisp users, Javascript users, ... I.e., electric indentation needs to be on in C, Octave, ..... > > Anyway, we should be showcasing it by default, using electric > > indentation, instead of hiding it behind configuration because users > > might want to lobotomize their indentation by rebinding . > That's arguing for changing the global default of electric-indent-mode. The global default should be On for C and Off for Python. > Whereas this bug report is about changing cc-mode to follow the > global preference, whichever way it's set. If it's been set. New users, hacking in both C and Python, should be able to have the major-mode dependent optimum, without having to set it. > Stefan -- Alan Mackenzie (Nuremberg, Germany).