1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -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:
Stefan Monnier 2006-08-26 14:39:16 +00:00
parent 854fa43e14
commit 426348643a
2 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2006-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-send-receive): Wait in the
process's buffer so as to check the right buffer-local variables.
2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/checkdoc.el: Remove * in defcustoms.

View file

@ -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.)