diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-26 14:39:16 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-26 14:39:16 +0000 |
commit | 426348643ad31779a4a50d86e702faf8e479b09d (patch) | |
tree | 4e1f4952e3329da1c60e329b86e7f291a987f4bf | |
parent | 854fa43e14f5c90333189bf895930c39aeaae662 (diff) | |
download | emacs-426348643ad31779a4a50d86e702faf8e479b09d.tar.gz |
(python-send-receive): Wait in the process's buffer so as to check the right
buffer-local variables.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1ee2324b00..f9dae73fefa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a7942c603f3..c38a6e82f83 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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.) |