Function: python-eldoc--get-doc-at-point
python-eldoc--get-doc-at-point is a byte-compiled function defined in
python.el.gz.
Signature
(python-eldoc--get-doc-at-point &optional FORCE-INPUT FORCE-PROCESS)
Documentation
Internal implementation to get documentation at point.
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.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(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-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 (and process
(python-shell-with-shell-buffer
(python-util-comint-end-of-output-p)))
(let* ((input (or force-input
(python-eldoc--get-symbol-at-point)))
(docstring
(when input
;; Prevent resizing the echo area when iPython is
;; enabled. Bug#18794.
(python-util-strip-string
(python-shell-send-string-no-output
(format
"%s\nprint(__PYDOC_get_help(%s))"
python-eldoc-setup-code
(python-shell--encode-string input))
process)))))
(unless (string-empty-p docstring)
docstring)))))