Date: Sat, 20 Apr 2024 16:50:22 +0300
From: Eli Zaretskii <eliz@gnu.org>
> Date: Sat, 20 Apr 2024 14:10:34 +0200
> From: Ergus <spacibba@aol.com>
>
> When the cursor is in an empty line and I press enter, the cursor jumps
> to the new line and indents (similar to what emacs does) but also
> removes the trailing whitespaces in the previous/leaving line.
Emacs does that since a long time ago (unless I misunderstand what you
mean).
Just to be more specific: it's the electric-indent-mode, which is ON
by default in Emacs since v24, that does this. So if you don't see
this when you press RET, just turning electric-indent-mode should be
all you need.