Re: How to get «imenu» back?

Eric Ludlam <[email protected]> Mon, 24 Nov 2014 11:01:30 -0500
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
On 11/03/2014 07:38 AM, Hi-Angel wrote:
> I don't like the «imenu» that semantic provides as it have a whole
> labyrinth of a titles like «Types», «Methods», etc. I liked the old
> «imenu» where I could just type one time a function to jump, and do
> not wonder in a word jungles.

Interesting.  Back when I wrote imenu support, that type of command 
wasn't around, and navigating the mega-menu was a pain so the word 
jungle made life much easier.

I suspect semantic-complete-jump-local has the same effect as imenu, but 
without the multiple levels.

If anyone knows how to make a function return a flat list for the 
"imenu" command, and the tree for the menu, let me know.

> So I wonder are there a way to return it? I set in my «.emacs»
> «(setq-default imenu-create-index-function
> 'imenu-default-create-index-function)» to undefine the semantic imenu
> function, but it didn't helped at all, in every new buffer I am still
> see the «semantic-create-imenu-index» set.

The simplest way to replace the per-mode configuration:

(defvar-mode-local c-mode imenu-create-index-function 
'imenu-default-create-index-function)

and swap in the mode you want.

> On the other hands if anybody knows a way to force the
> «semantic-create-imenu-index» work as an usual
> «imenu-default-create-index-function», that would be fine too.

If you do:

M-x customize-group RET semantic-imenu RET

you will have lots of options.   Turn off anything that says "bucketize" 
or refers to something related to putting things into buckets, which are 
the many submenus.  That should eventually get you down to a flat list 
again.

Good Luck
Eric

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic