[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: |
Sun, 19 Sep 2021 12:14:28 +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, but why not
>
> (use-package ace-jump-mode
> :hook ((prog-mode text-mode latex-mode) . ace-jump-mode))
This leads me to the following conclusion: Any number of pared nested
parentheses is equivalent in this case, i.e., all the following forms
are valid and equivalent:
:hook ((prog-mode text-mode latex-mode) . ace-jump-mode))
:hook (((prog-mode text-mode latex-mode) . ace-jump-mode)))
:hook ((((prog-mode text-mode latex-mode) . ace-jump-mode))))
But according to my tries, all the above three forms work, but the
following ones don't:
:hook (((((prog-mode text-mode latex-mode) . ace-jump-mode)))))
:hook ((((((prog-mode text-mode latex-mode) . ace-jump-mode))))))
[...]
Any hints for this phenomenon?
Regards, HZ