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


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15478 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: bug#15478: cc-mode does not obey electric-indent-mode
Date: Thu, 3 Oct 2013 09:45:43 +0000
On Thu, Oct 03, 2013 at 12:10:16AM -0400, Stefan Monnier wrote:
> >> That's because *you* like electric-indent-mode.  Not because C is special.
> > Electric indentation is more useful in a language like C than it is in
> > something like Python --- C has a richer set of brace characters.

> Right: Python is indeed special because fully automatic indentation is
> not really possible.  But C is not special in this respect.

I.e., electric indentation needs to be off in Python.

> > cc-mode's sophisticated syntactic indentation is an Emacs "killer feature".

> The "sophisticated syntactic indentation" is also a killer feature for
> Octave users, SML users, Lisp users, Javascript users, ...

I.e., electric indentation needs to be on in C, Octave, .....

> > Anyway, we should be showcasing it by default, using electric
> > indentation, instead of hiding it behind configuration because users
> > might want to lobotomize their indentation by rebinding <tab>.

> That's arguing for changing the global default of electric-indent-mode.

The global default should be On for C and Off for Python.

> Whereas this bug report is about changing cc-mode to follow the
> global preference, whichever way it's set.

If it's been set.  New users, hacking in both C and Python, should be
able to have the major-mode dependent optimum, without having to set it.

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