]> git.eshelyaron.com Git - emacs.git/commit
python.el: New non-global state dependent indentation engine.
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Tue, 27 Jan 2015 03:17:24 +0000 (00:17 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Tue, 27 Jan 2015 03:17:24 +0000 (00:17 -0300)
commit5485e3e5b28f82b46d139c63b8ab77ed1d7d61c9
treef914aa2e95c6178c437bbc472708a72e388cbc96
parent3b23e6a70294a3fee23353bfb8a23c7167d7c4ef
python.el: New non-global state dependent indentation engine.

Fixes: debbugs:18319
Fixes: debbugs:19595
* lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
PPSS as argument.
(python-syntax-closing-paren-p): New function.
(python-indent-current-level)
(python-indent-levels): Mark obsolete.
(python-indent-context): Return more context cases.
(python-indent--calculate-indentation)
(python-indent--calculate-levels): New functions.
(python-indent-calculate-levels): Use them.
(python-indent-calculate-indentation, python-indent-line):
(python-indent-line-function): Rewritten to use new API.
(python-indent-dedent-line): Simplify logic.
(python-indent-dedent-line-backspace): Use `unless`.
(python-indent-toggle-levels): Delete function.

* test/automated/python-tests.el (python-indent-pep8-1)
(python-indent-pep8-2, python-indent-pep8-3)
(python-indent-after-comment-1, python-indent-after-comment-2)
(python-indent-inside-paren-1, python-indent-inside-paren-2)
(python-indent-after-block-1, python-indent-after-block-2)
(python-indent-after-backslash-1, python-indent-after-backslash-2)
(python-indent-after-backslash-3, python-indent-block-enders-1)
(python-indent-block-enders-2, python-indent-block-enders-3)
(python-indent-block-enders-4, python-indent-block-enders-5)
(python-indent-dedenters-1, python-indent-dedenters-2)
(python-indent-dedenters-3, python-indent-dedenters-4)
(python-indent-dedenters-5, python-indent-dedenters-6)
(python-indent-dedenters-7, python-indent-dedenters-8): Fix tests.
(python-indent-base-case, python-indent-after-block-3)
(python-indent-after-backslash-5, python-indent-inside-paren-3)
(python-indent-inside-paren-4, python-indent-inside-paren-5)
(python-indent-inside-paren-6, python-indent-inside-string-1)
(python-indent-inside-string-2, python-indent-inside-string-3)
(python-indent-dedent-line-backspace-1): New Tests.
lisp/ChangeLog
lisp/progmodes/python.el
test/ChangeLog
test/automated/python-tests.el