Function: python-shell--extra-completion-context

python-shell--extra-completion-context is a byte-compiled function defined in python.el.gz.

Signature

(python-shell--extra-completion-context)

Documentation

Get extra completion context of current input in Python shell.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell--extra-completion-context ()
  "Get extra completion context of current input in Python shell."
  (let ((lines (python-shell--get-multiline-input))
        (python-indent-guess-indent-offset nil))
    (when (not (zerop (length lines)))
      (with-temp-buffer
        (delay-mode-hooks
          (insert (string-join lines "\n"))
          (python-mode)
          (python-shell-completion-extra-context))))))