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: Sat, 28 Sep 2013 20:11:47 +0000 Message-ID: <20130928201147.GC11317@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1380399258 28724 80.91.229.3 (28 Sep 2013 20:14:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Sep 2013 20:14:18 +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 Sat Sep 28 22:14:20 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 1VQ0uC-0003L1-Lw for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 22:14:20 +0200 Original-Received: from localhost ([::1]:42514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ0uC-0004xO-0V for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 16:14:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ0u2-0004x4-7S for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 16:14:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQ0tu-0008KN-UZ for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 16:14:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQ0tu-0008KH-R8 for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 16:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VQ0tu-0005Hb-9k for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 16:14:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Sep 2013 20:14: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 15478-submit@debbugs.gnu.org id=B15478.138039921420261 (code B ref 15478); Sat, 28 Sep 2013 20:14:02 +0000 Original-Received: (at 15478) by debbugs.gnu.org; 28 Sep 2013 20:13:34 +0000 Original-Received: from localhost ([127.0.0.1]:43626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ0tR-0005Gi-EN for submit@debbugs.gnu.org; Sat, 28 Sep 2013 16:13:33 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:27352 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ0tP-0005GZ-7X for 15478@debbugs.gnu.org; Sat, 28 Sep 2013 16:13:32 -0400 Original-Received: (qmail 57791 invoked by uid 3782); 28 Sep 2013 20:13:29 -0000 Original-Received: from acm.muc.de (pD951A22A.dip0.t-ipconnect.de [217.81.162.42]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 28 Sep 2013 22:13:28 +0200 Original-Received: (qmail 12803 invoked by uid 1000); 28 Sep 2013 20:11:47 -0000 Content-Disposition: inline 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:78785 Archived-At: Hi, Stefan. > Package: Emacs > Version: 24.3.50 > As the subject says, cc-mode should obey electric-indent-mode and only > perform auto-indent after inserting `;' or braces when the user has > requested it by enabling electric-indent-mode. There are problems with electric-indent-mode from the point of view of CC Mode: In particular, the electricity MUST be enabled by default in CC Mode, otherwise automatic indentation won't work. For example, after typing "}" at the end of an otherwise blank line, the "}" typically needs to be indented several spaces outwards. electric-indent-mode appears to be disabled by default. electric-indent-mode is not buffer local; c-electric-flag is. There is a key binding to toggle c-electric-flag, namely C-c C-l. There is a set of "minor mode" toggling commands in CC Mode, and it would seem not to be the Right Thing to destroy the coherence of this set. > Stefan -- Alan Mackenzie (Nuremberg, Germany).