This page is about library hl-defined.el, which lets you highlight symbols that are known to be defined functions and/or variables in an EmacsLisp buffer. Or you can highlight symbols that are not known to be defined functions or variables.
(Library highlight-fns.el is a rudimentary version of this feature; it just highlights defined functions. It is essentially made obsolete by library hl-defined.el.)
‘hdefd-highlight-mode’ is a minor mode that highlights, in the current buffer, all symbols that are known to be defined as Emacs-Lisp functions or variables or both. Alternatively, it can highlight symbols that are not known to be defined as functions or variables. The current buffer should be in EmacsLisp mode.
Command ‘hdefd-highlight-mode’ toggles highlighting on/off. The highlighting respects user option ‘hdefd-highlight-type’, which specifies whether to highlight functions and variables, only functions, only variables, or only undefined symbols.
Command ‘hdefd-cycle’ cycles highlighting among these available types and off (no such highlighting), as follows:
It does this by changing the current value of the option.
Highlighting uses these faces:
‘hdefd-functions’ – for defined functions‘hdefd-variables’ – for defined variables‘hdefd-undefined’ – for undefined symbolsTo use the library, put this in your init file:
(require 'hl-defined)
If you want to turn on this highlighting automatically for Emacs-Lisp mode, then put this in your init file after requiring the library:
(add-hook 'emacs-lisp-mode-hook 'hdefd-highlight-mode 'APPEND)