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

Previous Next

Packages: cc-mode, emacs;

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


View this message in rfc822 format

From: Daniel Colascione <dancol <at> dancol.org>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 15478 <at> debbugs.gnu.org
Subject: bug#15478: cc-mode does not obey electric-indent-mode
Date: Wed, 02 Oct 2013 23:31:26 -0700
[Message part 1 (text/plain, inline)]
On 10/2/13 10:56 PM, Andreas Röhler wrote:
> Experience from python-mode says: better keep electric-stuff and common
> indent apart.

What do you mean? I agree that the features should be separated in the
code and configured separately.

> Being aware new users might be attracted by these shiny and useful
> features, for Emacs beginners
> a lot of surprises may result.
> 
> IMHO that's part of the "steep learning curve", Emacs is often blamed of
> - too much electric stuff for beginners.

Python is special because the correct indentation, in the general case,
cannot be computed from buffer contents. As a result, electric
indentation will be frequently wrong and will annoy users. Electric
indentation in Python should default to off.

But most languages aren't like that. Most of the time, electric
indentation is a pure convenience, and should be on by default. I don't
agree that users would find it confusing in modes where indentation is
deterministic.

> Rather tell at README and Info what to activate once it works.

I couldn't disagree more strongly. Users don't read READMEs --- they
download a program, try it out, and in 15 minutes or so, decide whether
they want to invest time into it. Emacs needs to be better than other
editors out of the box. We can tell users how to turn _off_ electric
indentation in the documentation --- and we should probably add a menu
option for it.

[signature.asc (application/pgp-signature, attachment)]

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

Previous Next


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