Thanks for the response, but I really don't think this is the intended behaviour! If you type M-x python-mode if a == 3: the cursor will jump back and forth between column 0 and 4 on every alternate line, which simply does not make sense. As for the documentation, here is the relevant paragraph from C-h k RET: If `electric-indent-mode' is enabled, this indents the final new line that it adds, and reindents the preceding line. To just insert a newline, use M-x electric-indent-just-newline. Since we're in electric-indent-mode in the test case (it is enabled by default for me in emacs -Q), the behaviour I've seen definitely does not match the documentation. On Fri, May 9, 2014 at 4:09 PM, Eli Zaretskii wrote: > > Date: Fri, 9 May 2014 10:09:03 +0000 > > From: Philipp Rumpf > > > > In C mode and Python mode, hitting on an indented but otherwise > > empty line results in an unindented new line at point, rather than an > > indented line. > > > > To reproduce in emacs -Q: > > > > M-x python-mode > > if a == 3: > > > > M-: (current-column) > > > > Expected result: 4 / indented line > > Actual result: 0 / line not indented > > Per the design. "C-h k RET" displays this text: > > RET (translated from ) runs the command newline, which is an > interactive compiled Lisp function in `simple.el'. > > It is bound to RET. > > (newline &optional ARG INTERACTIVE) > > Insert a newline, and move to left margin of the new line if it's blank. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >