1235 |
"Switch to the Python process buffer. |
"Switch to the Python process buffer. |
1236 |
With prefix arg, position cursor at end of buffer." |
With prefix arg, position cursor at end of buffer." |
1237 |
(interactive "P") |
(interactive "P") |
1238 |
(if (get-buffer python-buffer) |
;; Start python unless we have a buffer. |
1239 |
(pop-to-buffer python-buffer) |
(unless (and python-buffer |
1240 |
(error "No current process buffer. See variable `python-buffer'")) |
(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) |
1245 |
(when eob-p |
(when eob-p |
1246 |
(push-mark) |
(push-mark) |
1247 |
(goto-char (point-max)))) |
(goto-char (point-max)))) |