4

Python's style guide (PEP 8: Indentation) suggests two alternatives for indenting the close paren for a multi-line function call.

some_function(
    first_long_argument,
    second_long_argument,
    )

or

some_function(
    first_long_argument,
    second_long_argument,
)

I'm getting the second style (with Emacs 24.5.1) with M-x indent-region but would like to know how to customize my .emacs configuration to get the first. I would like the first indentation to also result from tabbing the line with ')', as right now it remains unindented.

2
  • Please re-read the question and make sure that you have the "first" and "second" straight. Right now it looks like you typed "second" meaning "first" in some places. Dec 17, 2015 at 23:08
  • @Constantine Thanks, I straightened myself out.
    – Ian
    Dec 17, 2015 at 23:53

1 Answer 1

1

With python-mode.el, that would be py-closing-list-dedents-bos. Sorry, can't answer that WRT built-in python.el

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.