]> git.eshelyaron.com Git - emacs.git/commit
Fix point moving when calling python-shell-send-region
authorkobarity <kobarity@gmail.com>
Mon, 13 Feb 2023 15:30:15 +0000 (00:30 +0900)
committerEli Zaretskii <eliz@gnu.org>
Sat, 18 Feb 2023 16:43:11 +0000 (18:43 +0200)
commit5190ea6259a5fd13ba5e87b92b20f450658cf532
tree2ba3e8c9b0476c88d833a604a0a993064a9eb970
parent6c0d8210175e72dcd7cef2ad77b8f8b680b240bc
Fix point moving when calling python-shell-send-region

* lisp/progmodes/python.el (python-shell-buffer-substring): Add
`save-excursion' to prevent the point from moving.
* test/lisp/progmodes/python-tests.el (python-tests-should-not-move):
New helper function to assert that point does not move while calling a
function.
(python-shell-buffer-substring-*): Use
`python-tests-should-not-move'. (Bug#61463)
lisp/progmodes/python.el
test/lisp/progmodes/python-tests.el