u/FOSHavoc

▲ 2 r/emacs

Need help figuring out newline behaviour in doom emacs

I've been using doom emacs for a few years now. Recently I did an update and the behaviour of `newline` changed. Now, when I hit <enter> `newline` will also insert characters to continue a comment block. Specifically, what I mean is if I am in a comment block and hit <enter> `newline` will now insert a comment marker at the beginning of a new line. This is incredibly inconvenient because 80% of my comments are one line only and for the remaining cases I already had a different shortcut to do just that. I don't want the default `newline` to do it.

However, I'm having a hard time figuring out what exactly triggers this. Using `C-h k` I see that the function invoked is `newline`. Reading the documentation nothing strikes me as the obvious candidate. I have `electric-indent-mode` but that's fine - I want the indentation, I don't want the comment marker.

I tried asking an LLM to help me figure this out but it just suggests breakpoints which is not that useful if I don't know where to break.

Any ideas on what is doing this? And how I can disable it?

reddit.com
u/FOSHavoc — 1 day ago