How to navigate to erlang function in emacs by name?
I use emacs-mode. How can I navigate to function definition by name? Emacs has "imenu-add-to-menubar" command but it's not convenient way because I h开发者_运维技巧ave to select function name from menu.
Thank you!
You could use M-x imenu directly—it works only within the current file, though. I bind it to Super-i in my .emacs
with:
(global-set-key [(super ?i)] 'imenu)
Distel package has erl-find-source-under-point function, that is bound to M-. key You can read more about work with Erlang from Emacs in my article
Erlang is one of the many languages supported by tags. The Erlang docs show that you just build the tags file with:
find . -name "*.[he]rl" -print | etags -
Once you have a TAGS file, you just use M-., which calls 'find-tag
. This enables jumping to a function name from anywhere.
精彩评论