Managing outline-minor-mode to mode hooks

Heime <[email protected]> Fri, 03 Jul 2026 03:07:28 +0000
Newsgroups gmane.emacs.help
Message-ID <L9UU2QCWnkPKW1C_vcp9OkMYJyJHMCH8rmYZ-pwL8WsdQhu1KWtFhl5Pjqo9h-PDADDNJMdlRZrbDjVhKpi_stajPI_mPrUDSgMlyEJf2kA=@protonmail.com>
Is there a better way that might improve the addition or 
removal of outline-minor-mode?  Perhaps simply apply more
conveniently to prog-mode-hook?  Are there any other modes 
where it would be advantageous to add outline-minor-mode? 


(defun kronaire-outlmr-mdhooks (actm)
  (let ( (mhls '(sh-mode-hook
                 python-mode-hook
                 emacs-lisp-mode-hook
                 lisp-interaction-mode-hook
                 org-mode-hook
                 latex-mode-hook
                 texinfo-mode-hook
                 plain-tex-mode-hook
                 f90-mode-hook
                 fortran-mode-hook))

         (hkfn (cond
                  ((eq actm 'add) #'add-hook)
                  ((eq actm 'remove) #'remove-hook)
                  (t (error "%s ACTM %s is invalid"
                       "kronaire-outl-mdhooks, "
                       actm)))) )

    (dolist (mdhook mhls)
      ;; (funcall 'add-hook sh-mode-hook #'outline-minor-mode)
      (funcall hkfn mdhook #'outline-minor-mode)) ))