From 1066882c6ddb30f786d665c5db305897f20f7119 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:02:59 -0300 Subject: [PATCH] Simplified python-eldoc-function using python-shell-send-and-clear-output --- lisp/progmodes/python.el | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 -- 2.39.2