Is there and equivalent of func-menu for GNU emacs? I used func-menu when I had access to xemacs and I prefer its behaviour to that of the speedbar or sr-speedbar. Specifically:
I like that only the functions for the current file are displayed.
The function list can be popped up from the current frame and isn't a separate window which I may have covered up.
The current function name shows up in mode line.
Is there a package for GNU emacs which is a closer approximation to func-menu?
imenu
would be the analogous feature in GNU Emacs.
See C-hf imenu-add-menubar-index
RET.
You can call that in your mode hooks for modes with imenu
support.
Naturally elisp is supported, so for a quick demo:
find-library
RET imenu
RET
imenu-add-menubar-index
RET
and then see the new "Index" item in the menu bar, and also on C-<mouse3>
Of course there's also a keyboard interface, simply by calling M-x imenu
RET (with TAB completion), but I would highly recommend adding the ido
integration which can be found at the EmacsWiki* -- I find that to be a generally faster interface than using the mouse.
For more details, see C-hig (elisp) Imenu
RET
For configuration, see M-x customize-group
RET imenu
RET
(*) Along with numerous other ways of enhancing the feature, so even if you don't want to use ido
, you should definitely have a read through that Wiki page after you've seen the basic version in action.
Is this the XEmacs func-menu
mode you're talking about? It gives you a list of functions in the current file.
If so, then you can mostly replicate the functionality in GNU Emacs with the Collection of Emacs Development Tools, CEDET (specifically the Semantic code parser), and the Emacs Code Browser, ECB.
Note that ECB requires CEDET and both tend to be tricky to install without XEmacs's package manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With