diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9be2c7599b8..016e84270db 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1235,9 +1235,13 @@ to this as appropriate. Runs the hook `inferior-python-mode-hook' | |||
| 1235 | "Switch to the Python process buffer. | 1235 | "Switch to the Python process buffer. |
| 1236 | With prefix arg, position cursor at end of buffer." | 1236 | With prefix arg, position cursor at end of buffer." |
| 1237 | (interactive "P") | 1237 | (interactive "P") |
| 1238 | (if (get-buffer python-buffer) | 1238 | ;; Start python unless we have a buffer. |
| 1239 | (pop-to-buffer python-buffer) | 1239 | (unless (and python-buffer |
| 1240 | (error "No current process buffer. See variable `python-buffer'")) | 1240 | (get-buffer python-buffer)) |
| 1241 | (run-python nil t)) | ||
| 1242 | (pop-to-buffer python-buffer) | ||
| 1243 | ;; Make extra sure python is running in this buffer. | ||
| 1244 | (python-proc) | ||
| 1241 | (when eob-p | 1245 | (when eob-p |
| 1242 | (push-mark) | 1246 | (push-mark) |
| 1243 | (goto-char (point-max)))) | 1247 | (goto-char (point-max)))) |