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: Alan Mackenzie
Subject: bug#15478: cc-mode does not obey electric-indent-mode
Date: Wed, 9 Oct 2013 17:32:06 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Josh.

On Mon, Oct 07, 2013 at 02:17:23PM -0700, Josh wrote:
> On Mon, Oct 7, 2013 at 9:05 AM, Eli Zaretskii <address@hidden> wrote:

> > > On Sat, Oct 05, 2013 at 10:04:00PM -0700, Josh wrote:
> > > > On Sat, Oct 5, 2013 at 7:55 PM, Eli Zaretskii <address@hidden> wrote:
> > > > > > From: Stefan Monnier <address@hidden>
> > > > > > Date: Sat, 05 Oct 2013 21:10:01 -0400
> > > > > > Cc: address@hidden
> > > > > > For people who don't like electric-indent-mode, CC-mode's
> > > > > > c-electric-flag sucks just as much.
> > > > > Who are they, except for you?  Why don't we hear any complaints about
> > > > > that, except from you?

> > > >     c-electric-flag is a variable defined in `cc-engine.el'.
> > > >     Its value is t

> > > >       Automatically becomes buffer-local when set.

> > > >     Documentation:
> > > >     Not documented as a variable.

> > > > Do you hear many complaints about other undocumented variables?

> > > Here, the variable need only be accessed through the function below.  The
> > > emphasis on this variable is only in discussions like this one, not in
> > > user facilities.

> > Right.  And in any case, I meant complaints about the behavior, not
> > about the variables/functions that control it.


> I know what you meant.  The reason I pointed out the fact that that the
> variable that supposedly "solved" this is undocumented, that newbies will
> not recognize "electric" as pertinent, and all the rest of it is to show
> that disabling this behavior is far too arcane and burdensome for newbies.

This is getting tiresome.  The variable `c-electric-flag', strictly
speaking, isn't documented, but the command whose entire purpose is to
set it is fully documented in the CC Mode manual (have you read this
yet?) in the chapter directed at newbies.  Not only is it documented, it
is present in the Emacs menu under C/toggle/electric mode, a place
newbies are likely to look.  I think most of them will be able to guess
what "electric mode" means, and if not, they are likely to try it out to
see if it helps.

> As Daniel said upthread, "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."  I believe that most such users who dislike this
> behavior and start down the path I described will fail and be far less
> likely to invest further time in Emacs and move on to something else.
> Perhaps such users are a small minority; I don't know.  But I attribute the
> fact that you see few complaints about this behavior to selection bias,
> with some who dislike the behavior not complaining because they gave up and
> moved on to another editor while still others who dislike it do not
> complain because we managed to disable it ourselves.

I think you are wrong here.  Before the implementation of
`c-toggle-electric-state', there were several complaints about the
difficulty of turning off electric indentation in CC Mode.  Since then,
there have been none that I'm aware of, apart from this one.  This
suggests that users are capable of finding out about this facility and
that they find it adequate.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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