GNU bug report logs -
#77609
How to add multiple functions to one hook with :hook in use-package?
Previous Next
Full log
View this message in rfc822 format
Ping! How can we make any further progress here?
> Cc: 77609 <at> debbugs.gnu.org, rrt <at> sc3d.org
> Date: Fri, 25 Apr 2025 10:28:32 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: John Wiegley <johnw <at> gnu.org>
> > Cc: Reuben Thomas <rrt <at> sc3d.org>, 77609 <at> debbugs.gnu.org
> > Date: Thu, 24 Apr 2025 18:10:32 -0700
> >
> > >>>>> Eli Zaretskii <eliz <at> gnu.org> 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?
>
> The latter, I guess, assuming it isn't too complicated.
>
>
>
>
This bug report was last modified 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.