]> git.eshelyaron.com Git - emacs.git/commit
Add a new user option in Python mode to improve the indentation
authorkobarity <kobarity@gmail.com>
Sun, 16 Apr 2023 13:18:39 +0000 (22:18 +0900)
committerEli Zaretskii <eliz@gnu.org>
Sat, 22 Apr 2023 09:28:37 +0000 (12:28 +0300)
commit711e8bc7178d5dd78f4db5c34b2b23f605521fc4
treec0098a8c508081e051274b0c6c965cedc23aed2b
parent2f013c46f7116d53468de78c00903c87d100bbd9
Add a new user option in Python mode to improve the indentation

* lisp/progmodes/python.el (python-indent-block-paren-deeper): New
user option.
(python-indent-context): Add a new context :inside-paren-from-block.
(python-indent--calculate-indentation): Modify according to
`python-indent-block-paren-deeper' and :inside-paren-from-block.
* test/lisp/progmodes/python-tests.el
(python-indent-inside-paren-block-1)
(python-indent-inside-paren-block-2)
(python-indent-inside-paren-block-3)
(python-indent-inside-paren-block-4): New tests.
(python-indent-inside-paren-5, python-indent-dedenters-8): Modify
according to the new context.
* etc/NEWS: Document the new user option.  (Bug#62696)
etc/NEWS
lisp/progmodes/python.el
test/lisp/progmodes/python-tests.el