Subject: Re: bug#18228: 24.4.50; electrict-indent-mode bad indentation in python-mode

From: Andreas Röhler <[email-masked]>
Date: Mon, 11 Aug 2014 09:11:03 +0200

On 09.08.2014 12:00, Jorgen Schaefer wrote:
> Hi!
> With a freshly compiled Emacs (git ref 3fc84165), I get the following
> behavior. In a Python buffer with electric-indent-mode enabled, enter
> this:
>
>
> def foo():
>      print "Foo"
>
> def bar()
>
>
> Adding a colon (":"") at the end of bar() will then indent the line to
> the same indentation level as the "print" statement.
>
> While this is the default indentation level for RET after the print
> statement, I would expect that the colon will not reindent my current
> line. python-mode can not know which indentation level is correct,

Right.

But what should electric-indent do than? IMO the only reasonable is indenting to outmost permitted.
Which seems the case.

Electric behaviour seems not that useful in Python than with other modes.
AFAICS not a bug.

Best,

Andreas