]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplified python-eldoc-function using python-shell-send-and-clear-output
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:02:59 +0000 (00:02 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:02:59 +0000 (00:02 -0300)
lisp/progmodes/python.el

index ed6bb3189c9ab6b68d55da513c36e7c46dceb6f3..735f25dfa54168faffcd5e3ebf909e27f4e0e5ac 100644 (file)
@@ -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