mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
(python-send-receive): Wait in the process's buffer so as to check the right
buffer-local variables.
This commit is contained in:
parent
854fa43e14
commit
426348643a
2 changed files with 13 additions and 7 deletions
|
|
@ -1576,14 +1576,15 @@ will."
|
|||
(defun python-send-receive (string)
|
||||
"Send STRING to inferior Python (if any) and return result.
|
||||
The result is what follows `_emacs_out' in the output."
|
||||
(python-send-string string)
|
||||
(let ((proc (python-proc)))
|
||||
(python-send-string string)
|
||||
(set (make-local-variable 'python-preoutput-result) nil)
|
||||
(while (progn
|
||||
(accept-process-output proc 5)
|
||||
(null python-preoutput-result)))
|
||||
(prog1 python-preoutput-result
|
||||
(kill-local-variable 'python-preoutput-result))))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(set (make-local-variable 'python-preoutput-result) nil)
|
||||
(while (progn
|
||||
(accept-process-output proc 5)
|
||||
(null python-preoutput-result)))
|
||||
(prog1 python-preoutput-result
|
||||
(kill-local-variable 'python-preoutput-result)))))
|
||||
|
||||
;; Fixme: Is there anything reasonable we can do with random methods?
|
||||
;; (Currently only works with functions.)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue