summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-12-10 13:05:49 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-12-10 13:05:49 +0100
commitaa2872a12770282ede3548ed3fcab00c5a5b9f18 (patch)
treef1521a4e511cfea656d47e738d6be687b9d23707
parentc8e19b3a8446b37faba44b04dce37b2c3b44e199 (diff)
downloademacs-aa2872a12770282ede3548ed3fcab00c5a5b9f18.tar.gz
Make `M-x run-python' select the window again
* lisp/progmodes/python.el (python-shell-make-comint): Make `M-x run-python' select the window again like in 27.2 (bug#52380).
-rw-r--r--lisp/progmodes/python.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f1c3e75bb73..6357c4f2d3e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2994,8 +2994,9 @@ killed."
(mapconcat #'identity args " ")))
(with-current-buffer buffer
(inferior-python-mode))
- (when show (display-buffer buffer))
(and internal (set-process-query-on-exit-flag process nil))))
+ (when show
+ (pop-to-buffer proc-buffer-name))
proc-buffer-name))))
;;;###autoload
@@ -3027,7 +3028,6 @@ process buffer for a list of commands.)"
(python-shell-make-comint
(or cmd (python-shell-calculate-command))
(python-shell-get-process-name dedicated) show)))
- (set-buffer buffer)
(get-buffer-process buffer)))
(defun run-python-internal ()