简体   繁体   中英

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

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 doing this once, but don't remember how...

Mx find-function RET (function name) RET

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

(global-set-key (kbd "Ch Cf") 'find-function)

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.

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-, .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM