[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17449: 24.4.50; Empty lines confuse electric-indent-post-self-insert
From: |
Eli Zaretskii |
Subject: |
bug#17449: 24.4.50; Empty lines confuse electric-indent-post-self-insert-function. |
Date: |
Fri, 09 May 2014 19:09:42 +0300 |
> Date: Fri, 9 May 2014 10:09:03 +0000
> From: Philipp Rumpf <prumpf@gmail.com>
>
> In C mode and Python mode, hitting <RET> 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<RET>
> if a == 3:<RET>
> <RET>
> M-: (current-column)<RET>
>
> Expected result: 4 / indented line
> Actual result: 0 / line not indented
Per the design. "C-h k RET" displays this text:
RET (translated from <return>) 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.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^