GNU emacs function menu equivalent

Is there an equivalent function menu for GNU emacs? I used func-menu when I had access to xemacs and I prefer its behavior over speed pace or sr-speedbar. In particular:

  • I like that only functions for the current file are displayed.

  • The list of functions can be derived from the current frame and is not a separate window, which I may have closed.

  • The current function name is displayed in the mode line.

Is there a package for GNU emacs that comes closer to the func menu?

+7
source share
3 answers

imenu will be a similar feature in GNU Emacs.

See Ch f imenu-add-menubar-index RET .
You can call this in interception mode for imenu enabled imenu .

Naturally, elisp is supported, so for a quick demonstration:

  • Mx find-library RET imenu RET
  • Mx imenu-add-menubar-index RET

and then see the new "Pointer" item in the menu bar, and also on C- <mouse3>

Of course, there is also a keyboard interface by simply calling Mx imenu RET (with TAB completion), but I highly recommend adding the ido integration, which can be found in EmacsWiki * - I believe this is a faster interface than using a mouse.

For more details see Ch i g (elisp) Imenu RET

For configuration see Mx customize-group RET imenu RET

(*) Along with many other ways to improve the function, therefore, even if you do not want to use ido , you should definitely read this Wiki page after you see the basic version in action.

+7
source

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 basically replicate the functionality in GNU Emacs using the Emacs Development, CEDET (specifically, the Semantic Code Analyzer) development tools, and the Emacs Code Browser, ECB .

  • The ECB Methods window shows all the characters in the selected source code buffer. This is a separate window in the sense of Emacs, that is, an editing area showing a single buffer, some of which can be in the same window of the manager window. This is not an Emacs frame, so it will not be closed.
  • Semantic stickyfunc-mode can display the current function in the line at the top of the source code buffer. It uses a GNU Emacs-specific title bar . This is not quite the same as showing the function name in the mode line, but close enough.

Note that ECB requires CEDET, and both are difficult to install without the XEmacs package manager.

+3
source

I am not sure, but I thought that the "transition to a function in the buffer" was called fume-mode. If so, looking for an analog signal for smoke mode can help you get a zero value for what you are looking for.

Here is an excerpt from the XEmacs manual that mentions smoke mode:

"41. Go to the function inside the buffer.

Suppose you have a file with many features. Well, this package makes it easy to go to any of these features. The names of the functions in the current buffer are automatically placed in the menu, you select one of the names of the functions, and the point has moved to this very function. The sign is clicked on the label, so you can easily return to where you were. In addition, you can use enter the name of the desired function through the minibuffer, which offers the completion of input. In addition, the function name before the dot is optionally displayed in the simulation.

The following modes are supported:

Ada, Assembly, BibTex, C ++, C, Dired, Ehdm, ELisp, FORTRAN, Ksh, Latex, Lelisp, Makefile, Maple, Modula2, Modula3, Outline, Objective-C, Pascal, Perl, Postscript, Prolog, PVS, Python, SGML, Schema, Tcl, Verilog, Manual, Ruby, JavaScript

To install this package, add the following to the initialization file:

 (add-hook 'find-file-hooks 'fume-setup-buffer) (add-hook 'Manual-mode-hook 'turn-on-fume-mode)" 
0
source

All Articles