Variable: imenu-name-lookup-function

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".