Emacs: how to jump to function definition in .el file?

后端 未结 4 1904
星月不相逢
星月不相逢 2020-12-13 08:36

I tried to edit my init file. Is there any possible way to quickly jump into function definition of other .el file that has already loaded/required ?

I remember doin

相关标签:
4条回答
  • 2020-12-13 08:54

    M-x find-function RET (function name) RET

    I find that C-h C-f makes a good keybinding for find-function (given that C-h f is bound by default to describe-function)

    (global-set-key (kbd "C-h C-f") 'find-function)

    0 讨论(0)
  • 2020-12-13 08:54

    As of emacs-25.1, there's a new generic function xref-find-definitions. The xref built-in package provides a generic framework for navigating definitions in code. Probably, it'd take some time for every mode to adjust custom functions for this framework, but, at the very least, emacs-lisp-mode already ported.

    0 讨论(0)
  • 2020-12-13 09:06

    find-function is the way to go. An alternative is to use C-h f, then click the file name in buffer *Help*.

    0 讨论(0)
  • 2020-12-13 09:18

    etags [options] file1 file2 ... and then, from inside emacs, do M-. to visit the tag. To go the the next occurrence of the tag, do M-,.

    0 讨论(0)
提交回复
热议问题