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's 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 assume it's somehow useful or else it wouldn't be there... I just can't think of a good use for it...
It allows you to set hook variables before the packages which define them have been loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With