]> git.eshelyaron.com Git - emacs.git/commitdiff
(python-send-receive): Wait in the process's buffer so as to check the right
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 26 Aug 2006 14:39:16 +0000 (14:39 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 26 Aug 2006 14:39:16 +0000 (14:39 +0000)
buffer-local variables.

lisp/ChangeLog
lisp/progmodes/python.el

index e1ee2324b00165c65c4f3375891cad12130879db..f9dae73fefa93e83bd4c94966b3e70d294b5e09b 100644 (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.
index a7942c603f3dc439773463f31882a8964410f971..c38a6e82f83218ae4126984e0f0b4d3354983bba 100644 (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.)