[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The cons syntax format used by use-package.
From: |
Hongyi Zhao |
Subject: |
Re: The cons syntax format used by use-package. |
Date: |
Sat, 18 Sep 2021 21:33:02 +0800 |
On Sat, Sep 18, 2021 at 9:21 PM Daniel Fleischer <danflscr@gmail.com> wrote:
>
> Hongyi Zhao [2021-09-18 Sat 21:15] wrote:
>
> > (use-package ace-jump-mode
> > :hook ((prog-mode text-mode) . ace-jump-mode))
> >
> > If I wanted to extend the above example with more hooks, which of the
> > following would be correct:
>
> The 2nd one,
Thank you for pointing this out.
> but why not
>
> (use-package ace-jump-mode
> :hook ((prog-mode text-mode latex-mode) . ace-jump-mode))
The trivial and redundant one can be easily extended to complex generic form:
(use-package foo
:hook (((x-mode y-mode) . bar-mode)
(z-mode . baz-mode)))
Regards, HZ