Function: imenu
imenu is an autoloaded, interactive and byte-compiled function defined
in imenu.el.gz.
Signature
(imenu INDEX-ITEM)
Documentation
Jump to a place in the buffer chosen using a buffer menu or mouse menu.
INDEX-ITEM specifies the position. See imenu-choose-buffer-index
for more information.
Probably introduced at or before Emacs version 19.24.
Key Bindings
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/imenu.el.gz
;;;###autoload
(defun imenu (index-item)
"Jump to a place in the buffer chosen using a buffer menu or mouse menu.
INDEX-ITEM specifies the position. See `imenu-choose-buffer-index'
for more information."
(interactive (list (imenu-choose-buffer-index)))
;; Convert a string to an alist element.
(if (stringp index-item)
(setq index-item (assoc index-item (imenu--make-index-alist))))
(when index-item
(pcase index-item
(`(,name ,pos ,fn . ,args)
(push-mark nil t)
(apply fn name pos args)
(run-hooks 'imenu-after-jump-hook))
(`(,name . ,pos) (imenu (list name pos imenu-default-goto-function)))
(_ (error "Unknown imenu item: %S" index-item)))))