I'm trying to add a function I created to a hook, but the obvious (to my Schemer mind) way doesn't seem to work. The function is used in 2 places and I want to keep my code DRY so no anonymous function. Though I could wrap my function in a lambda, there must be a better way.
Doesn't work:
(defun my-function ()
;; do my stuff)
(add-hook 'some-hook-list my-function)
I get the error message:
Symbol's value as variable is void: my-function