I been reading a blog post from Chris Wanstrath from 2010 where he write about
coffee-mode. He proposed there this functions hook:
(defun coffee-custom () "coffee-mode-hook" ;; Emacs key binding (define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)) (add-hook 'coffee-mode-hook '(lambda () (coffee-custom)))
coffee-mode.el you can see similar hook call
"... Add `'(lambda () (coffee-cos-mode t))' to `coffee-mode-hook' to turn it on by default."
I don't understand the use of lambda calling another function in order to execute it. Why not simply:
(add-hook 'coffee-mode-hook 'my:coffee-custom)