Variable: imenu-name-lookup-function
imenu-name-lookup-function is a buffer-local variable defined in
imenu.el.gz.
Documentation
Function to compare string with index item.
This function will be called with two strings, and should return non-nil if they match.
If nil, comparison is done with string=.
Set this to some other function for more advanced comparisons,
such as "begins with" or "name matches and number of
arguments match".
Source Code
;; Defined in /usr/src/emacs/lisp/imenu.el.gz
;;;###autoload
(defvar-local imenu-name-lookup-function nil
"Function to compare string with index item.
This function will be called with two strings, and should return
non-nil if they match.
If nil, comparison is done with `string='.
Set this to some other function for more advanced comparisons,
such as \"begins with\" or \"name matches and number of
arguments match\".")