emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC


From: Alan Mackenzie
Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.
Date: Wed, 26 Mar 2014 21:21:17 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Stefan.

On Mon, Mar 24, 2014 at 09:54:40PM -0400, Stefan wrote:

> >> > A mode-dependent or buffer-local dependent setting, as well as, rather
> >> > than instead of.
> >> We have that: electric-indent-local-mode and electric-indent-inhibit.
> > OK, for electric-indent-local-mode, which is gradually becoming
> > prominent.  But I thought electric-indent-inhibit was a variable for major
> > modes, not users - a mode initialisation thing, rather than a user
> > configuration variable.

> Indeed electric-indent-inhibit is not meant as a user-config.
> And electric-indent-mode is not meant as a buffer-local config.
> So what?  There is electric-indent-local-mode which is meant as
> a buffer-local user-config.

> So what is the problem?  Please tell precisely what feature you miss
> rather than just criticize the existing ones.

I seem to have lost the thread here.  Maybe there aren't any.

> >> Lack of patch implementing this (supposed) simple change?
> > Here is what I propose, and am willing to do:
> > 1. For electric indentation:
> >   a - Restore `newline' and `newline-and-indent' to their traditional
> >     functionality, and remove `electric-newline-and-maybe-indent'.
> >   b - Simplify `electric-indent-post-self-insert-function' such that it
> >     reindents only the line on which the self-inserting character is
> >     typed.
> >   c - Reform `electric-indent-local-mode' as a first-class minor mode and
> >     `electric-indent-mode' as a global version of it.
> > 2. For making RET indent the new line in programming modes:
> >   a - Bind RET to `newline-and-indent' and C-j to `newline' in
> >     `prog-mode-map' and possibly in certain other major mode maps (to be
> >     discussed).
> >   b - (Maybe) create a minor mode to restore RET and C-j to traditional
> >     bindings.
> > The above will leave electric-indent-mode functioning pretty much as it
> > currently does.  What do you say?

> I want to keep electric-indent-mode as a global mode that determines
> whether certain self-inserting keys (such as RET and others) auto-indent.

How is this not satisfied by e-i-m being a define-globalized-minor-mode?
With the current setup, we have a rather contorted relationship between
e-i-m and e-i-local-m, with buffer local copies of electric-indent-mode
popping into and out of existence.

What about the rest of my suggestion?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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