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 #26 received at 15478 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15478 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: Re: bug#15478: cc-mode does not obey electric-indent-mode
Date: Wed, 02 Oct 2013 19:46:42 -0700
[Message part 1 (text/plain, inline)]
On 10/2/13 6:50 PM, Stefan Monnier wrote:
>> Without electricity, correct indentation would require continual pressing
>> of the <tab> key.
> 
> Yes.  Just as is the case in all major modes.
> 
>> "|" indicates the position of point.  Now type "{".  With electricity,
>> the "{" is instantly indented to its correct position under the "if".
>> Without electricity, the user needs to remember to type <tab> before C-j
>> on L4.  This is an unacceptable default state, IMAO.
> 
> 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.
cc-mode's sophisticated syntactic indentation is an Emacs "killer feature".

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


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

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.