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: Daniel Colascione
Subject: bug#15478: cc-mode does not obey electric-indent-mode
Date: Wed, 02 Oct 2013 23:31:26 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

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.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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