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


Solution 1:

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)

Solution 2:

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.