In light that this may be a duplicate, but I did not find the answer to my question scouring this site.
The default behavior of GNU Emacs appears to have electric-indent-mode
enabled, which is fine almost everywhere. However, I would like to change the behavior for trimming whitespace at the end of the line and auto-indenting after pressing Return for only one mode: Fundamental.
In essence, I would like Enter to simply add a newline (electric-indent-just-newline
) while pressing Alt+Enter to insert the default newline
.
How would I go about it? I found this, but I do not seem to get it converted to work with Fundamental.