[forwarded from http://bugs.debian.org/208303\]
Currently, if you place the body of a lambda on the
next line (to
curb rightward drift), the Emacs Python mode indents it
like this:
...
lambda x:
body_of_lambda()
...
In keeping with Lisp traditions, and to improve
readability, I suggest
a small amount of indentation for the lambda body, eg:
lambda x:
body_of_lambda()
or
lambda x:
body_of_lambda()
Logged In: YES
user_id=44345
Matthias, is this still a problem for you? In XEmacs, I get a
four-space indent if I end the line with "lambda:" and hit the
TAB key on the next line. (Please check with the latest
version. It's accumulated several changes in the past day.)
Logged In: YES
user_id=60903
The bug submitter responded in the original report:
It looks like there's some indentation now, which is
certainly an
improvement, but it's relative to the entire statement, so (eg)
function_with_callback(1, 2, 3, lambda args:
body_of_the_lambda)
He prefers:
function_with_callback(1, 2, 3, lambda args:
body_of_the_lambda)
so that the lambda body is visually attached to the lambda.
Logged In: YES
user_id=44345
Matthias, I'm sympathetic to your plight, but the code that's responsible
for computing indentation is already too complex and my lisp-fu isn't
sufficient for the problem. Unassigning in case some other intrepid
Lisp cowboy wants to tackle this.