Function: which-function-mode

Toggle mode line display of current function (Which Function mode).
With a prefix argument ARG, enable Which Function mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil.

Which Function mode is a global minor mode. When enabled, the
current function name is continuously displayed in the mode line,
in certain major modes. (fn &optional ARG)

Variable: which-function-mode

Non-nil if Which-Function mode is enabled.
See the command `which-function-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `which-function-mode'.