Function: python-shell-completion-complete-or-indent

python-shell-completion-complete-or-indent is an interactive and byte-compiled function defined in python.el.gz.

Signature

(python-shell-completion-complete-or-indent)

Documentation

Complete or indent depending on the context.

If content before pointer is all whitespace, indent. If not try to complete.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-completion-complete-or-indent ()
  "Complete or indent depending on the context.
If content before pointer is all whitespace, indent.
If not try to complete."
  (interactive)
  (if (string-match "^[[:space:]]*$"
                    (buffer-substring (comint-line-beginning-position)
                                      (point)))
      (indent-for-tab-command)
    (completion-at-point)))