diff options
| author | Tino Calancha <tino.calancha@gmail.com> | 2018-05-15 01:30:11 +0900 |
|---|---|---|
| committer | Tino Calancha <tino.calancha@gmail.com> | 2018-05-15 01:30:11 +0900 |
| commit | b015fb0ce37235480af8d80bce8c2f9b7e6258eb (patch) | |
| tree | 39ee5a78a3c0a8fe13bbf42652a73301d21eb4e0 /lisp/progmodes/python.el | |
| parent | c2caf763cfe3bb85b4933ffac12695a7cb366cd4 (diff) | |
| download | emacs-b015fb0ce37235480af8d80bce8c2f9b7e6258eb.tar.gz | |
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.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 32d645cfcc9..a09ca2f2f29 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2842,10 +2842,12 @@ process buffer for a list of commands.)" (y-or-n-p "Make dedicated process? ") (= (prefix-numeric-value current-prefix-arg) 4)) (list (python-shell-calculate-command) nil t))) - (get-buffer-process - (python-shell-make-comint - (or cmd (python-shell-calculate-command)) - (python-shell-get-process-name dedicated) show))) + (let ((buffer + (python-shell-make-comint + (or cmd (python-shell-calculate-command)) + (python-shell-get-process-name dedicated) show))) + (pop-to-buffer buffer) + (get-buffer-process buffer))) (defun run-python-internal () "Run an inferior Internal Python process. |
