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

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

Re: Disabling automatic reindentation of the current line after a newlin


From: Anders Munch
Subject: Re: Disabling automatic reindentation of the current line after a newline
Date: Tue, 25 Oct 2022 10:23:05 +0000

Stefan Monnier wrote:
>> line when I press RET. What I'd like is for Emacs to auto-insert the 
>> number of spaces it deems necessary for the new, still blank line 
>> whenever I press RET, without also reindenting the previous line,
>
> Set `electric-indent-inhibit` to t.

How do you do that when electric-indent-inhibit automatically becomes
buffer-local when set?

> Tho if it's only for the cases where Emacs's choice of indentation is wrong 
> [..]

I'm with Jean. I find it an unpleasant experience when keybindings that I expect
to insert text to the right of the cursor, suddenly also changes text to the
left of the cursor.

I do use C-q C-j, but I'd like to reserve that for when I don't want the next
line indented.  TAB usually works fine for reindenting the current line.

Is there any reason that having electric-indent-inhibit set to t globally is not
viable? 

regards, Anders



reply via email to

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