Function: python-imenu-create-index

python-imenu-create-index is a byte-compiled function defined in python.el.gz.

Signature

(python-imenu-create-index)

Documentation

Return tree Imenu alist for the current Python buffer.

Change python-imenu-format-item-label-function, python-imenu-format-parent-item-label-function, python-imenu-format-parent-item-jump-label-function to customize how labels are formatted.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-imenu-create-index ()
  "Return tree Imenu alist for the current Python buffer.
Change `python-imenu-format-item-label-function',
`python-imenu-format-parent-item-label-function',
`python-imenu-format-parent-item-jump-label-function' to
customize how labels are formatted."
  (goto-char (point-max))
  (let ((index)
        (tree))
    (while (setq tree (python-imenu--build-tree))
      (setq index (cons tree index)))
    index))