aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2007-03-05 19:57:03 +0000
committerStefan Monnier <[email protected]>2007-03-05 19:57:03 +0000
commit86a3e45eea1176c0af1fedc38c11f2959570d5e3 (patch)
treef73b4e7c6855f9d13560342ac6a3e5a1dffa170a /lisp/progmodes/python.el
parent2c5b1db7f5d4582ee735b2f33b29616f5e370244 (diff)
(python-send-command): Restart proc if necessary.
(python-proc): Simplify.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 38e846aa2c..6c37fb859e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1383,11 +1383,11 @@ buffer for a list of commands.)"
COMMAND should be a single statement."
;; (assert (not (string-match "\n" command)))
;; (let ((end (marker-position (process-mark (python-proc)))))
- (with-current-buffer python-buffer (goto-char (point-max)))
+ (with-current-buffer (process-buffer (python-proc))
+ (goto-char (point-max))
(compilation-forget-errors)
(python-send-string command)
- (with-current-buffer python-buffer
- (setq compilation-last-buffer (current-buffer)))
+ (setq compilation-last-buffer (current-buffer)))
;; No idea what this is for but it breaks the call to
;; compilation-fake-loc in python-send-region. -- Stef
;; Must wait until this has completed before re-setting variables below.
@@ -1517,9 +1517,9 @@ See variable `python-buffer'. Starts a new process if necessary."
;; isn't one for `python-buffer'.
(unless (comint-check-proc python-buffer)
(run-python nil t))
- (get-buffer-process (or (if (derived-mode-p 'inferior-python-mode)
- (current-buffer)
- python-buffer))))
+ (get-buffer-process (if (derived-mode-p 'inferior-python-mode)
+ (current-buffer)
+ python-buffer)))
(defun python-set-proc ()
"Set the default value of `python-buffer' to correspond to this buffer.