diff options
| author | Fabián Ezequiel Gallina <fgallina@cuca> | 2012-05-17 00:03:41 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2012-05-17 00:03:41 -0300 |
| commit | 035c45e336a3ef831bfdb3bbfcfa1bb925c9783b (patch) | |
| tree | 082ded5c053f94f082d0892584b0c1ced4f082f0 /lisp/progmodes/python.el | |
| parent | 8f1eba8b5e51ddaf4f9779271be20a8a75b4d7a0 (diff) | |
Do not call `switch-to-buffer' in `python-shell-get-or-create-process'
For this to work properly `run-python' now calls
`python-shell-make-comint' with the POP argument set to nil.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
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). (y-or-n-p "Make dedicated process? ") (read-string "Run Python: " (python-shell-parse-command))) (list nil (python-shell-parse-command)))) - (python-shell-make-comint cmd (python-shell-get-process-name dedicated) t) + (python-shell-make-comint cmd (python-shell-get-process-name dedicated)) dedicated) (defun run-python-internal () @@ -1511,8 +1511,7 @@ of commands.)" (defun python-shell-get-or-create-process () "Get or create an inferior Python process for current buffer and return it." - (let* ((old-buffer (current-buffer)) - (dedicated-proc-name (python-shell-get-process-name t)) + (let* ((dedicated-proc-name (python-shell-get-process-name t)) (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) (global-proc-name (python-shell-get-process-name nil)) (global-proc-buffer-name (format "*%s*" global-proc-name)) @@ -1524,7 +1523,6 @@ of commands.)" (setq dedicated-running t) (setq global-running t))) ;; Always prefer dedicated - (switch-to-buffer old-buffer) (get-buffer-process (if dedicated-running dedicated-proc-buffer-name global-proc-buffer-name)))) |
