GNU bug report logs - #15478
cc-mode does not obey electric-indent-mode

Previous Next

Packages: emacs, cc-mode;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sat, 28 Sep 2013 18:12:02 UTC

Severity: normal

Found in version 24.3.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 15478 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15478 <at> debbugs.gnu.org
Subject: Re: bug#15478: cc-mode does not obey electric-indent-mode
Date: Sat, 28 Sep 2013 20:11:47 +0000
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).




This bug report was last modified 11 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.