From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:02:59 +0000 (-0300) Subject: Simplified python-eldoc-function using python-shell-send-and-clear-output X-Git-Tag: emacs-24.2.90~1199^2~612 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1066882c6ddb30f786d665c5db305897f20f7119;p=emacs.git Simplified python-eldoc-function using python-shell-send-and-clear-output --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ed6bb3189c9..735f25dfa54 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1494,18 +1494,8 @@ inferior python process is updated properly." (forward-char) (delete-region (point-marker) (search-forward "self.")) (setq input (buffer-substring (point-min) (point-max))))) - (process-send-string - process (format python-eldoc-string-code input)) - (accept-process-output process) - (with-current-buffer (process-buffer process) - (when comint-last-prompt-overlay - (save-excursion - (goto-char comint-last-input-end) - (re-search-forward comint-prompt-regexp - (line-end-position) t) - (buffer-substring-no-properties - (point-marker) - (overlay-start comint-last-prompt-overlay)))))))) + (python-shell-send-and-clear-output + (format python-eldoc-string-code input) process)))) (with-current-buffer (process-buffer process) (when comint-last-prompt-overlay (delete-region comint-last-input-end