GNU bug report logs - #18228
24.4.50; electrict-indent-mode bad indentation in python-mode

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <forcer <at> forcix.cx>

Date: Sat, 9 Aug 2014 10:02:02 UTC

Severity: minor

Found in version 24.3.93

Fixed in version 24.4.50

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: 18228 <at> debbugs.gnu.org
Subject: bug#18228: 24.4.50; electrict-indent-mode bad indentation in python-mode
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






This bug report was last modified 10 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.