I've used python-mode and what I had to learn and I don't know if this
is nailing you was once an indent was arranged, when a new line is typed
only hit tab once. The python-mode for me then indented all code
correctly. If I examined the spacing of the indent and tried hitting
tab more than once (second guessing python_mode) that's when I got
myself into trouble. If this is nailing you, I hope this helps.
On Sun, 28 Jun 2015, Florian Weimer wrote:
> Date: Sun, 28 Jun 2015 15:47:03
> From: Florian Weimer <
f...@deneb.enyo.de>
> To:
help-gn...@gnu.org
> Newsgroups: gnu.emacs.help
> Subject: python-mode's broken indentation behavior
>
> Indentation in python-mode has been fairly broken for me, I believe
> since Emacs 24. The electric colon makes this especially annoying.
>
> In the following, _ marks the position of point.
>
> If I press RET here:
>
> def foo(x):
> if x:
> return 2
> else:
> raise Foo_
>
> I get this, which is correct.
>
> def foo(x):
> if x:
> return 2
> else:
> raise Foo
> _
>
> Continuing typing:
>
> def foo(x):
> if x:
> return 2
> else:
> raise Foo
> for i in range(0, 10)_
>
> So far, so good. Now press ?:?:
--