bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62696: python.el: Extra indentation for conditionals


From: Gustaf Waldemarson
Subject: bug#62696: python.el: Extra indentation for conditionals
Date: Sun, 16 Apr 2023 17:49:26 +0200

Hello,

I think that's a really good idea actually. It might also be a good idea to add a
negative example (i.e., the black-indentation style you mentioned earlier), or
a reference to one (maybe to the tests?)

Best regards,
Gustaf

Den sön 16 apr. 2023 kl 15:24 skrev kobarity <kobarity@gmail.com>:

kobarity wrote:
> Gustaf Waldemarson wrote:
> > "Increase indentation inside parens of a block.
> > When this variable is set to non-nil and the contents of a block
> > inside parens are indented to the same level as outside the same
> > block, increase the indentation of the line."
>
> Thank you for your suggestion.  I think this is more readable and
> would like to make changes in this direction.

I have concluded that it's better to include an example in the
docstring of `python-indent-block-paren-deeper'.  How about the
following?  I also attached the updated patch.

"Increase indentation inside parens of a block.
If non-nil, increase the indentation of the lines inside parens
in a header of a block when they are indented to the same level
as the body of the block:

    if (some_expression
            and another_expression):
        do_something()

instead of:

    if (some_expression
        and another_expression):
        do_something()

This variable only works if the opening paren is followed by
non-whitespace characters on the same line.  Modify
`python-indent-def-block-scale' to customize the case where
non-whitespace character does not follow the opening paren on the
same line."

Best regards,
kobarity

reply via email to

[Prev in Thread] Current Thread [Next in Thread]