Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 7481:cca39d719aba legacy-trunk
(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.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 25 Feb 1998 16:45:43 +0000 |
| parents | 55c3fd1853ce |
| children | 1fb868f25459 |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Feb 25 16:33:56 1998 +0000 +++ b/Misc/python-mode.el Wed Feb 25 16:45:43 1998 +0000 @@ -1199,8 +1199,8 @@ (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 @@ (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
