(imenu-example--generic-c++-expression): New variable.
(imenu-example--generic-texinfo-expression): New variable.
(imenu-example--generic-latex-expression): New variable.
(imenu-example--create-c++-index): Deleted.
(imenu-example--function-name-regexp-c++): Deleted.
(imenu--generic-function): New function.
(imenu--generic-extract-name): New function.
(imenu-default-create-index-function): Added the generic function calls for
the provided examples.
(imenu--cleanup): New function.
(imenu-example--name-and-position): Now uses markers.
(imenu-add-to-menubar): New function to add an entry
to the menubar for the buffer's current local keymap.