bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#17128: 24.3.50; `newline-and-indent' should not indent the current l


From: Dmitry Gutov
Subject: bug#17128: 24.3.50; `newline-and-indent' should not indent the current line
Date: Tue, 01 Apr 2014 08:37:44 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 28.03.2014 16:17, Stefan Monnier wrote:
There's `reindent-then-newline-and-indent' for that.

Agreed.

Hmm, I'm not sure about the patch, though.

If `newline-and-indent' shouldn't reindent the current line [even when electric-indent-mode is enabled] because there's `reindent-then-newline-and-indent', then `newline' likewise probably shouldn't (re)indent either of the lines because of the existence of the former two functions.

In that case, my suggestion to separate the electric indent on RET from indenting after newline wouldn't exactly work.

Could we define new commands in electric-mode, and bind them when it's on?

Something like `electric-maybe-indent-then-newline' and `electric-maybe-reindent-then-newline-and-indent'.





reply via email to

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