diff --git a/.emacs.d/lisp/python.el b/.emacs.d/lisp/python.el index 4c8f4c6..3fe62e0 100644 --- a/.emacs.d/lisp/python.el +++ b/.emacs.d/lisp/python.el @@ -3940,15 +3940,25 @@ See `python-check-command' for the default." :type 'string :group 'python) +(defun python-eldoc--get-symbol-at-point () + (or (save-excursion + (when (let ((start (python-syntax-context 'paren))) + (when start + (goto-char start)) + (= (char-after) ?\()) + (skip-chars-backward " \t\n\\\\") + (python-info-current-symbol))) + (python-info-current-symbol))) + (defun python-eldoc--get-doc-at-point (&optional force-input force-process) "Internal implementation to get documentation at point. -If not FORCE-INPUT is passed then what `python-info-current-symbol' +If not FORCE-INPUT is passed then what `python-eldoc--get-symbol-at-point' returns will be used. If not FORCE-PROCESS is passed what `python-shell-get-process' returns is used." (let ((process (or force-process (python-shell-get-process)))) (when process (let ((input (or force-input - (python-info-current-symbol t)))) + (python-eldoc--get-symbol-at-point)))) (and input ;; Prevent resizing the echo area when iPython is ;; enabled. Bug#18794.