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


Message #140 received at 15478 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Josh <josh <at> foxtail.org>
Cc: 15478 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#15478: cc-mode does not obey electric-indent-mode
Date: Wed, 9 Oct 2013 17:55:44 +0000
Hi, Josh.

On Mon, Oct 07, 2013 at 02:23:20PM -0700, Josh wrote:
> On Mon, Oct 7, 2013 at 6:11 AM, Alan Mackenzie <acm <at> muc.de> wrote:

> > >   (or c-force-electric-flag electric-layout-mode electric-indent-mode)
> > That's not going to gain anything, since `c-force-electric-flag' would
> > need to default to t to preserve existing behaviour.

> The need to preserve existing behavior is not a given.

No, but there haven't been arguments that CC Mode's default for electric
indentation is wrong, and there certainly hasn't been a bug report saying
that.  Users seem to be happy about the current default.  I'm convinced
that electric indentation switched on is the right default for CC Mode,
for the same reasons that gave rise to its invention in the first place,
in all probability.

> The above change would cause the (initial) enablement of electric
> behavior in CC Mode to be predicated on global electricity enablement,
> which is the subject of this bug.

> > > .... Even so, it would be a vast improvement for newbies who do not
> > > want this behavior.

> > Yes, but it would be undesirable for those other newbies who do want
> > automatic indentation.  "Newby" here means those unfamiliar with
> > `c-toggle-electric-state' and `electric-indent-mode'.

> Identifying the right set of defaults is important and likely to be an
> extensive discussion in itself, but one that should take place as part
> of some other bug.  This bug is about the fact that CC Mode disregards
> configuration that is documented to be global.

But the solution is not to disregard other bits of documented
configuration instead.  Local, specific configurations generally
supersede global, general configurations.

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