jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.42k stars 260 forks source link

Combine multiple hooks into one. #945

Closed hongyi-zhao closed 1 year ago

hongyi-zhao commented 3 years ago

Can I combine multiple hooks into one with use-package's :hook keyword, as shown below:

(use-package bla
  [...]  
  :hook (((a-mode b-mode c-mode) . (d-mode e-mode))))

Regards, HY

skangas commented 1 year ago

This is not currently possible, but you can do this:

(use-package bla
  :hook (((a-mode b-mode c-mode) . d-mode)
         ((a-mode b-mode c-mode) . e-mode)))

I believe this is a duplicate of #676, so I'm closing this issue.