bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15478: cc-mode does not obey electric-indent-mode


From: Alan Mackenzie
Subject: bug#15478: cc-mode does not obey electric-indent-mode
Date: Sat, 28 Sep 2013 20:11:47 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]