(defgroup imenu): Add :link.
(imenu-use-markers, imenu-auto-rescan-maxout, imenu-generic-expression)
(imenu--make-index-alist, imenu-default-goto-function): Doc fixes.
(imenu-max-item-length, imenu-sort-function)
(imenu-scanning-message): Custom tweak.
(imenu-progress-message): Use real backquote syntax.
(imenu--in-alist): Unused function deleted.
(imenu--flatten-index-alist): Likewise.
(imenu-case-fold-search): Add autoload cookie.
(imenu--completion-buffer): Offer function at point as default.
(imenu--subalist-p): Don't use caadr.
(imenu): Don't use caddr.
(imenu-add-menubar-index): New function.
Truncate imenu items.
Make use of markers or integers an option.
(imenu-use-markers, imenu-max-item-length): New variables.
(imenu-max-items): Doc fix.
(imenu-example--name-and-position): Handle imenu-use-markers.
(imenu-default-create-index-function): Likewise.
(imenu--generic-function): Likewise.
(imenu--truncate-items): New function.
(imenu--make-index-alist): Call imenu--truncate-items.
(imenu--generic-function): Fixed probably a typo: named appeared
twice in an item. Put function after name and beg in a special
item because a normal item has name and beg (for orthogonality).
(imenu-add-to-menubar): First test to see if the mode supports imenu.
(imenu--menubar-select): Use the defined variable imenu-rescan-item.
(imenu-default-goto-function): New subroutine, broken out of `imenu'.
(imenu-default-goto-function): New variable.
(imenu): Made it use the above function, via that variable.
Keep subalists at top level too.
Name the split-off submenus from the first item in them.
(imenu--generic-function): Avoid adding nil as elt of the result.
(imenu--split-menu): Handle imenu-sort-function here.
(imenu--mouse-menu, imenu-update-menubar): Not here.
(imenu--mouse-menu): Rewrite second half--handle nested menus reliably.
(imenu--create-keymap-2): Include ITEM in the leaf menu-item.
(imenu-create-submenu-name): Function deleted.
(imenu-example--create-lisp-index): Don't use it.
(imenu--generic-function): Don't use imenu-create-submenu-name.
(imenu-submenu-name-format): Variable deleted.
(imenu--split-menu): Use TITLE as the head of the new list.
Don't split if everything fits in one level.
(imenu--split-submenus): New function.
(imenu-update-menubar): Use imenu--split-submenus.
(imenu--mouse-menu): Use imenu--split-submenus.