aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/python.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7cfbb34aea3..1b98a046b6a 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1473,7 +1473,7 @@ run).
1473 (y-or-n-p "Make dedicated process? ") 1473 (y-or-n-p "Make dedicated process? ")
1474 (read-string "Run Python: " (python-shell-parse-command))) 1474 (read-string "Run Python: " (python-shell-parse-command)))
1475 (list nil (python-shell-parse-command)))) 1475 (list nil (python-shell-parse-command))))
1476 (python-shell-make-comint cmd (python-shell-get-process-name dedicated) t) 1476 (python-shell-make-comint cmd (python-shell-get-process-name dedicated))
1477 dedicated) 1477 dedicated)
1478 1478
1479(defun run-python-internal () 1479(defun run-python-internal ()
@@ -1511,8 +1511,7 @@ of commands.)"
1511 1511
1512(defun python-shell-get-or-create-process () 1512(defun python-shell-get-or-create-process ()
1513 "Get or create an inferior Python process for current buffer and return it." 1513 "Get or create an inferior Python process for current buffer and return it."
1514 (let* ((old-buffer (current-buffer)) 1514 (let* ((dedicated-proc-name (python-shell-get-process-name t))
1515 (dedicated-proc-name (python-shell-get-process-name t))
1516 (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) 1515 (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
1517 (global-proc-name (python-shell-get-process-name nil)) 1516 (global-proc-name (python-shell-get-process-name nil))
1518 (global-proc-buffer-name (format "*%s*" global-proc-name)) 1517 (global-proc-buffer-name (format "*%s*" global-proc-name))
@@ -1524,7 +1523,6 @@ of commands.)"
1524 (setq dedicated-running t) 1523 (setq dedicated-running t)
1525 (setq global-running t))) 1524 (setq global-running t)))
1526 ;; Always prefer dedicated 1525 ;; Always prefer dedicated
1527 (switch-to-buffer old-buffer)
1528 (get-buffer-process (if dedicated-running 1526 (get-buffer-process (if dedicated-running
1529 dedicated-proc-buffer-name 1527 dedicated-proc-buffer-name
1530 global-proc-buffer-name)))) 1528 global-proc-buffer-name))))