summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-11-17 19:24:47 (GMT)
committerBarry Warsaw <barry@python.org>1998-11-17 19:24:47 (GMT)
commit014e0e29b10d12c53c9094c1070ba26ee07cf23f (patch)
treee73feac30bc301907f73f754b7d466fc7dd92bce /Misc
parent50cd34888b6c83888e122139b1b222b668d5f138 (diff)
downloadcpython-014e0e29b10d12c53c9094c1070ba26ee07cf23f.zip
cpython-014e0e29b10d12c53c9094c1070ba26ee07cf23f.tar.gz
cpython-014e0e29b10d12c53c9094c1070ba26ee07cf23f.tar.bz2
(py-execute-region): Patch by Hunter Kelly so that execution uses the
correct Python shell (CPython or JPython).
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 12c2d11..2adc3c6 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -1040,8 +1040,8 @@ comint believe the user typed this string so that
(defun py-comint-output-filter-function (string)
"Watch output for Python prompt and exec next file waiting in queue.
This function is appropriate for `comint-output-filter-functions'."
+ ;; TBD: this should probably use split-string
(when (and (or (string-equal string ">>> ")
- ;; NT XEmacs 21.0 kludge
(and (>= (length string) 5)
(string-equal (substring string -5) "\n>>> ")))
py-file-queue)
@@ -1200,7 +1200,7 @@ is inserted at the end. See also the command `py-clear-queue'."
(interactive "r\nP")
(or (< start end)
(error "Region is empty"))
- (let* ((proc (get-process "Python"))
+ (let* ((proc (get-process py-which-bufname))
(temp (if (memq 'broken-temp-names py-emacs-features)
(let
((sn py-serial-number)
@@ -1216,7 +1216,7 @@ is inserted at the end. See also the command `py-clear-queue'."
;; always run the code in its own asynchronous subprocess
(async
(let* ((buf (generate-new-buffer-name py-output-buffer)))
- (start-process "Python" buf py-python-command "-u" file)
+ (start-process py-which-bufname buf py-which-shell "-u" file)
(pop-to-buffer buf)
(py-postprocess-output-buffer buf)
))
@@ -1231,7 +1231,7 @@ is inserted at the end. See also the command `py-clear-queue'."
(setq py-exception-buffer (cons file (current-buffer))))
(t
;; otherwise either run it synchronously in a subprocess
- (shell-command-on-region start end py-python-command py-output-buffer)
+ (shell-command-on-region start end py-which-shell py-output-buffer)
;; shell-command-on-region kills the output buffer if it never
;; existed and there's no output from the command
(if (not (get-buffer py-output-buffer))