Previous: Imenu, Up: Defuns


31.2.4 Which Function Mode

Which Function mode is a minor mode that displays the current function name in the mode line, updating it as you move around in a buffer.

To enable (or disable) Which Function mode, use the command M-x which-function-mode. This command is global; it applies to all buffers, both existing ones and those yet to be created. However, it takes effect only in certain major modes, those listed in the value of which-func-modes. If the value is t, then Which Function mode applies to all major modes that know how to support it—in other words, all the major modes that support Imenu.