[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two imenu entries for same function in C-mode

From: martin rudalics
Subject: Re: two imenu entries for same function in C-mode
Date: Tue, 19 Apr 2005 08:28:18 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]