I have introduced the following hook function inside a minor mode. The intention is to activate the minor mode for a number of major modes. I would also need to activate outline-minor-mode once tika-minor-mode is enabled. And disable outline-minor-mode when tika-minor-mode is turned off.
;;;###autoload
(defun tika-addhook ()
"Activate minor-mode' automatically for specific major-modes."
(add-hook 'emacs-lisp-mode-hook #'tika-minor-mode)
(add-hook 'sh-mode-hook #'tika-minor-mode)
(add-hook 'f90-mode-hook #'tika-minor-mode)
(add-hook 'fortran-mode-hook #'tika-minor-mode)
(add-hook 'latex-mode-hook #'tika-minor-mode)
(add-hook 'plain-tex-mode-hook #'tika-minor-mode))
I have the following function for the task
Have seen the use of ;;;###autoload but I not sure whether it is required to call function after the require clause in my .emacs. From what I can understand, a minor mode needs some way to enable its functionality and do not think that tika-addhook would execute automatically if it not called after loading the minor mode functionality.
(add-to-list 'load-path "~/bin/tika")
(require 'tika)
(tika-addhook)