Dima Kogan writes: > Hi. > > I'm seeing a regression introduced in 2019/01 by an update meant to make > electric-pair-mode and electric-layout-mode play nicely: > > http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fd943124439b7644392919bca8bc2a77e6316d92 > > Recipe: > > 1. 'emacs -Q' with any emacs more recent than that patch > > 2. Open up tst.c that contains this: > > int main(int argc, char* argv[]) > { > return 0; > } > > > 3. Move the point to the beginning of the line containing "return 0" > > 4. RET RET RET RET RET > > Now there're a bunch of new lines between the { and the "return 0", as > expected. But these lines aren't empty: they contain the initial > indentation whitespace. This whitespace shouldn't be there; and it > wasn't there prior to this patch. Right, the problem is that electric-indent-inhibit only partially disables electric indent, and the commit you reference changes which parts. The patch below disables it more completely. Note however, that this makes RET not do any electric indentation at all, just like in the good old days of Emacs 24.3. Possibly c-mode should rebind RET to a c-electric-return command or something.