comparison lisp/progmodes/python.el @ 72535:e7ed98d0f919

(python-send-receive): Wait in the process's buffer so as to check the right buffer-local variables.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 26 Aug 2006 14:39:16 +0000
parents 9d3a9b609c04
children 41f22ed02e75 6823a91487f2
comparison
equal deleted inserted replaced
72534:4e3fb498c183 72535:e7ed98d0f919
1574 (add-to-list 'debug-ignored-errors "^No symbol") 1574 (add-to-list 'debug-ignored-errors "^No symbol")
1575 1575
1576 (defun python-send-receive (string) 1576 (defun python-send-receive (string)
1577 "Send STRING to inferior Python (if any) and return result. 1577 "Send STRING to inferior Python (if any) and return result.
1578 The result is what follows `_emacs_out' in the output." 1578 The result is what follows `_emacs_out' in the output."
1579 (python-send-string string)
1579 (let ((proc (python-proc))) 1580 (let ((proc (python-proc)))
1580 (python-send-string string) 1581 (with-current-buffer (process-buffer proc)
1581 (set (make-local-variable 'python-preoutput-result) nil) 1582 (set (make-local-variable 'python-preoutput-result) nil)
1582 (while (progn 1583 (while (progn
1583 (accept-process-output proc 5) 1584 (accept-process-output proc 5)
1584 (null python-preoutput-result))) 1585 (null python-preoutput-result)))
1585 (prog1 python-preoutput-result 1586 (prog1 python-preoutput-result
1586 (kill-local-variable 'python-preoutput-result)))) 1587 (kill-local-variable 'python-preoutput-result)))))
1587 1588
1588 ;; Fixme: Is there anything reasonable we can do with random methods? 1589 ;; Fixme: Is there anything reasonable we can do with random methods?
1589 ;; (Currently only works with functions.) 1590 ;; (Currently only works with functions.)
1590 (defun python-eldoc-function () 1591 (defun python-eldoc-function ()
1591 "`eldoc-print-current-symbol-info' for Python. 1592 "`eldoc-print-current-symbol-info' for Python.