In both cases, beg (match-beginning index) is the same (at "write_abbrev"), but start (point, or match-beginning 0) is not. When INDEX-POSITION was beg, index-alist only got the first match, as ensured by the member test on imenu.el:841. But now that INDEX-POSITION is start, index-alist gets two entries for the same-named item, albeit at slightly different positions.
The beg/start dichotomy might also explain why INDEX-POSITION occasionally gets me to a rather strange place: `java-mode', for example, seems to prefer a position two characters before the end of the keyword preceding the listed identifier - something like "vo-!-id" or "Stri-!-ng". If there's no such keyword the first suitable character string is used and I might find myself in a preceding comment. `cperl-mode', on the other hand, puts me at the _end_ of the identifier listed by imenu.
_______________________________________________ Emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
