summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-02-25 16:45:43 (GMT)
committerBarry Warsaw <barry@python.org>1998-02-25 16:45:43 (GMT)
commit2f32fbba3425d0d76bb7cdc962e92c46119abe42 (patch)
tree8dc9ae296aaa6906dbe212e8ca64bf1f8a0c5b3f /Misc
parent6c6db0a07361f4283dc12f3a30cddc4b4522f41d (diff)
downloadcpython-2f32fbba3425d0d76bb7cdc962e92c46119abe42.zip
cpython-2f32fbba3425d0d76bb7cdc962e92c46119abe42.tar.gz
cpython-2f32fbba3425d0d76bb7cdc962e92c46119abe42.tar.bz2
(py-execute-region): Simplified calculation of temporary file name.
When running synchronously in a subproc buffer, be sure to pop-to-buffer so the output is visible.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index bbe38b3..0ba72ab 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -1199,8 +1199,8 @@ is inserted at the end. See also the command `py-clear-queue'."
(prog1
(format "python-%d" py-serial-number)
(setq py-serial-number (1+ py-serial-number)))
- (make-temp-name "python")))
- (file (concat (file-name-as-directory py-temp-directory) temp)))
+ (make-temp-name "python-")))
+ (file (expand-file-name temp py-temp-directory)))
(write-region start end file nil 'nomsg)
(cond
;; always run the code in it's own asynchronous subprocess
@@ -1224,6 +1224,7 @@ is inserted at the end. See also the command `py-clear-queue'."
(shell-command-on-region start end py-python-command py-output-buffer)
(setq py-exception-buffer (current-buffer))
(py-postprocess-output-buffer py-output-buffer)
+ (pop-to-buffer py-output-buffer)
))))
;; Code execution command