Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package?

From: John Wiegley <[email-masked]>
Date: Thu, 24 Apr 2025 18:10:32 -0700

>>>>> Eli Zaretskii <[email-masked]> writes:

>> It's unfortunate that this is part of an error message, as I've never seen the error, but I think this explains the
>> syntax, and indeed says that you can't add multiple functions to a single hook with one :hook line; in other
>> words, it would be necessary to write something like:
>> 
>> (use-package foo-mode
>> :hook
>> ((foo-mode . function-a)
>> (foo-mode . function-b)))

> John, can you please help in understanding how the documentation could be
> clarified in this regard?

I mean, there’s no reason it could be extended to support a list, like:

  (foo-mode . (function-a function b))

So do we want to document the restriction, or relax it?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2