[Top][All Lists]

[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: Dmitry Gutov
Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.
Date: Tue, 25 Mar 2014 03:49:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan <address@hidden> writes:

> You might get used to "RET reindents" and stop hitting TAB that often
> ;-)

Maybe. :) But if I'm going to type anything else at all on the given
line before typing RET, the hand is itching to reindent before that, to
make text look ordered.

> For me one of the reasons why it's not gratuitous is because of things like:
>        begin
>          blabla
>          blibli
>        end
> Go to just before "blibli" and type "end RET": notice that hitting TAB
> just before RET won't help you, because you need to reindent the line
> after the newline is inserted.

I can see how this could be handy, but it's not an example I see
frequently. In part because I use `ruby-end', which inserts `end' after
one types a block beginner and SPC or RET. So one's inclined to produce
all `end' keywords that way, to keep them paired.

In any case, this seems to depend on the language having
keyword-delimited blocks and no semicolons.  This does not characterize
the majority of the languages Emacs supports, I think.

>> For all others, just swapping C-j and RET bindings would've worked just
>> as well, and I think it would result in simpler code.
> Again "just swapping" sounds simple, but I'm not sure what patch you
> have in mind.

I've commented on Alan's proposed plan of action.

> I think it's important for the user to be able to easily
> say something like (electric-indent-mode -1) (and/or its buffer-local
> equivalent) to recover the Emacs-23 behavior.

The importance of this is not clear to me, but I guess it wouldn't hurt
to have this, either way.

reply via email to

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