]> git.eshelyaron.com Git - emacs.git/commit
Fix python-fill-paragraph problems on filling strings (bug#62142)
authorkobarity <kobarity@gmail.com>
Sun, 12 Mar 2023 08:05:54 +0000 (17:05 +0900)
committerEli Zaretskii <eliz@gnu.org>
Thu, 16 Mar 2023 14:59:06 +0000 (16:59 +0200)
commit5cf1de683b2414927e521c34daeee460fb7649f5
tree8f3602006d4454ddb7be376fea41dfe15e5f3c94
parent7385c991dff3466b37cf50628e7685cd53e71921
Fix python-fill-paragraph problems on filling strings (bug#62142)

* lisp/progmodes/python.el (python-syntax--context-compiler-macro)
(python-syntax-context): Add single-quoted-string and
triple-quoted-string as TYPE argument.
(python-info-triple-quoted-string-p): New helper function.
(python-fill-paragraph)
(python-fill-string): Use it.
* test/lisp/progmodes/python-tests.el (python-syntax-context-1)
(python-fill-paragraph-single-quoted-string-1)
(python-fill-paragraph-single-quoted-string-2)
(python-fill-paragraph-triple-quoted-string-1)
(python-info-triple-quoted-string-p-1)
(python-info-triple-quoted-string-p-2)
(python-info-triple-quoted-string-p-3): New tests.
lisp/progmodes/python.el
test/lisp/progmodes/python-tests.el