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: Stefan
Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.
Date: Wed, 19 Mar 2014 21:46:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> And the same holds true for all other programming modes.
> No it doesn't.  We both agree that Emacs Lisp Mode has no use whatsoever
> for electric indentation.

No, I don't agree.  First because most people don't use C-j but use
RET instead, and second because typing text linearly is far from being
the only important editing pattern.

> Then I suggest you think hard about the disadvantages of RET as an
> electric indentation key.  If there weren't such disadvantages, CC Mode
> would have been using it for 20 years.

I need your help here, I'm afraid.  And I'm obviously not the only,
because it's very common for text editors to "auto-indent on RET"
(either by default, or via a config setting).

>> There are details about *how* e-i-m works which depend on the mode.
>> Yes.  That's why e-i-m has mode-local settings (e.g. which keys are
>> electric, or whether the indentation algorithm can reliably reindent).
> Any "indentation algorithm" can reliably reindent.

No: python-mode, haskell-mode, and coffeescript-mode can't.

> Clearly.  I am pointing out that this definition is perhaps a suboptimal
> one.

I don't see what you mean by "definition" not "suboptimal".

> Your scheme makes it difficult for a user to set up a major mode as
> being non e-i-m, or even an individual buffer.

How so?

> Not even that.  You were in so much of a hurry to reinvent the wheel,
> that you were oblivious of perfectly round wheels with smooth bearings
> which had been in existence for ~20 years.

No, I know those wheels very well, because I suffered through many of
them.  The problem is they're not modular: your rebinding of ?{ to make
it auto-indent means that my global binding of ?{ to make it auto-pair
doesn't work in c-mode.


        Stefan



reply via email to

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