emacs-devel
[Top][All Lists]
Advanced

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

Re: Default behaviour of RET.


From: Alan Mackenzie
Subject: Re: Default behaviour of RET.
Date: Wed, 23 Oct 2013 20:18:09 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Dmitry.

On Tue, Oct 22, 2013 at 12:04:32AM +0400, Dmitry Gutov wrote:

> I really have to wonder when anyone would wish to use RET bound to
> newline. Why? Does some popular major mode provide inadequate
> indentation function, so that you have to pick whether to indent the
> next line automatically or not?

`newline' is the Right Thing to do in non-programming modes like Text
Mode, at least a lot of the time.

For example, it is if you have paragraphs indented like this one, where
    you use auto-fill-mode to calculate a non-null fill prefix to indent
    subsequent lines of the paragraph and RET to start a new paragraph at
    column zero.

Even in programming modes, you might want to start a whole-line comment
at column zero, even where (or especially where) the code is deeply
indented.

My personal position is that I'm quite happy with RET doing `newline' and
C-j doing `newline-and-indent', but (despite being a traditionalist) I
wouldn't be that bothered if those bindings were exchanged.  I would be
most unhappy if the `newline' functionality were to be obliterated, even
in restricted circumstances like `electric-indent-mode' being enabled and
\n being in `electric-indent-chars'.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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