1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

run-python: Make the buffer running python current

* lisp/progmodes/python.el (run-python, python-shell-make-comint):
Make the buffer running the inferior python process the current buffer
(Bug#31398).
* test/lisp/progmodes/python-tests.el (python-tests--bug31398):
Add test.
This commit is contained in:
Tino Calancha 2018-05-15 01:30:11 +09:00
parent c2caf763cf
commit b015fb0ce3
2 changed files with 14 additions and 4 deletions

View file

@ -5352,6 +5352,14 @@ buffer with overlapping strings."
(python-nav-end-of-statement)))
(should (eolp))))
;; After call `run-python' the buffer running the python process is current.
(ert-deftest python-tests--bug31398 ()
"Test for https://debbugs.gnu.org/31398 ."
(let ((buffer (process-buffer (run-python nil nil 'show))))
(should (eq buffer (current-buffer)))
(pop-to-buffer (other-buffer))
(run-python nil nil 'show)
(should (eq buffer (current-buffer)))))
(provide 'python-tests)