comparison lisp/progmodes/python.el @ 58357:9fc67253aa56

(python-switch-to-python): If Python isn't running, start it.
author Richard M. Stallman <rms@gnu.org>
date Sat, 20 Nov 2004 20:39:16 +0000
parents e6bf7376c962
children 6ec84037b6bc
comparison
equal deleted inserted replaced
58356:4ca1b78a471f 58357:9fc67253aa56
1233 1233
1234 (defun python-switch-to-python (eob-p) 1234 (defun python-switch-to-python (eob-p)
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))))
1244 1248
1245 (add-to-list 'debug-ignored-errors "^No current process buffer.") 1249 (add-to-list 'debug-ignored-errors "^No current process buffer.")