[Top][All Lists]

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

Re: newline-and-indent vs. electric-indent-mode

From: Dmitry Gutov
Subject: Re: newline-and-indent vs. electric-indent-mode
Date: Sat, 23 Jan 2021 01:00:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 23.01.2021 00:56, Stefan Monnier wrote:
That would disable the effects of electric-indent-functions, and in
particular, of ruby--electric-indent-p.
I don't see why.  AFAIK it should only inhibit the "reindent original
line when inserting \n".  It should affect indentation of the line after
the inserted \n nor should it affect indentation when inserting
other chars.

It also affect "reindent original line when inserting something other than \n", which is what ruby--electric-indent-p is all about (e.g. I type 'd' finishing the token 'end', and the line is reindented).

It's just that in my mental model \n doesn't belong to the current line, only to the next one. So it shouldn't reindent the original line.

Perhaps others feel differently.

reply via email to

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