From C-h f add-hook:
HOOK should be a symbol, and FUNCTION may be any valid function. If
HOOK is void, it is first set to nil. If HOOK value is a single
function, it is changed to a list of functions.
and from the code:
(defun add-hook (hook function &optional append local)
...
(or (boundp hook) (set hook nil))
(or (default-boundp hook) (set-default hook nil))
...
What is this good for? I suppose this is somehow useful, otherwise it won’t ... I just can't come up with a good use for this ...
source
share