GNU bug report logs - #17128
24.3.50; `newline-and-indent' should not indent the current line

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 28 Mar 2014 06:19:02 UTC

Severity: normal

Tags: patch

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 17128 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17128 <at> debbugs.gnu.org
Subject: Re: bug#17128: 24.3.50; `newline-and-indent' should not indent the
 current line
Date: Tue, 01 Apr 2014 08:37:44 +0300
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'.




This bug report was last modified 11 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.