I like to use python-mode.el and (gnu) emacs for editing my python files. If I use parentheses for multiline continuations, indentation works as I expect. For example,
foo_long_long_long_long = (
bar_long_long_long_long[
(x_long_long_long_long == X) &
(y_long_long_long_long == Y)])
is just the way I like it.
On the other hand, if I use a backslash for continuations, a single indentation is created and all subsequent lines stop using the extra indentation logic. Below the third and fourth lines fail to have any extra indentation
foo_long_long_long_long = \
bar_long_long_long_long[
(x_long_long_long_long == X) &
(y_long_long_long_long == Y)]
Does anyone know how to fix python-mode.el (5.1.0) so that backslash continuations indent the same as parenthesis continuations?
EDIT: Although I'm happy to just use parens all day long (python is after all, rather lisp like...), I collaborate with others who use backslash continuations. Emacs messes up the indentation when I press TAB, which I often do as a reflex. It'd be nice to be able to edit their files and have emacs keep all its indentation smarts when working with backslash line continuations.