Previous: FFAP, Up: Hyperlinking


29.28.4 Finding Function and Variable Definitions

M-x find-function <RET> function <RET>
Find the definition of function in its source file.
M-x find-variable <RET> variable <RET>
Find the definition of variable in its source file.
M-x find-function-on-key <RET> key
Find the definition of the function that key invokes.

These commands provide an easy way to find the definitions of Emacs Lisp functions and variables. They are similar in purpose to the Tags facility (see Tags), but don't require a tags table; on the other hand, they only work for function and variable definitions that are already loaded in the Emacs session.

To find the definition of a function, use M-x find-function. M-x find-variable finds the definition of a specified variable. M-x find-function-on-key finds the definition of the function bound to a specified key.

To use these commands, you must have the Lisp source (`.el') files available along with the compiled (`.elc') files, in directories in load-path. You can use compressed source files if you enable Auto Compression mode. These commands only handle definitions written in Lisp, not primitive functions or variables defined in the C code of Emacs.