I want to understand hooks in elisp. I have tematika-minor-mode
which needs to be activated for emacs-lisp-mode and sh-mode.
Is this the way to do it ?
(defun tematika-activate ()
"Activate `tematika-minor-mode'."
(tematika-minor-mode 1))
(defun tematika-hooks ()
"TODO"
(add-hook 'emacs-lisp-mode-hook #'tematika-activate)
(add-hook 'sh-mode-hook #'tematika-activate))
Prior to Emacs 24.1 that was correct.
Since 24.1 you don't need the intermediate function. Quoting its NEWS file: