+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.
(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.)