(py-execute-region): Make sure the new temporary buffer is current for

the insertion of the text.
This commit is contained in:
Barry Warsaw 2000-06-23 20:24:25 +00:00
parent d08b4c4524
commit 99eadf4de9
1 changed files with 4 additions and 3 deletions

View File

@ -1284,10 +1284,11 @@ is inserted at the end. See also the command `py-clear-queue'."
;; Write the contents of the buffer, watching out for indented regions.
(save-excursion
(goto-char start)
(when (/= (py-point 'bol) (py-point 'boi))
(let ((needs-if (/= (py-point 'bol) (py-point 'boi))))
(set-buffer buf)
(insert "if 1:\n"))
(insert-buffer-substring cur start end))
(when needs-if
(insert "if 1:\n"))
(insert-buffer-substring cur start end)))
(cond
;; always run the code in its own asynchronous subprocess
(async