]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Make `M-x run-python' select the window again"
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 10 Dec 2021 12:07:24 +0000 (13:07 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 10 Dec 2021 12:07:24 +0000 (13:07 +0100)
This reverts commit aa2872a12770282ede3548ed3fcab00c5a5b9f18.

This led to a test failure.

lisp/progmodes/python.el

index 6357c4f2d3e54f03e754111f3a44ba79859dcd02..f1c3e75bb7364eb1769c7fd53e619f1159960651 100644 (file)
@@ -2994,9 +2994,8 @@ 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
@@ -3028,6 +3027,7 @@ 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 ()