GNU bug report logs - #72993
31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Tue, 3 Sep 2024 02:03:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: John Wiegley <johnw <at> gnu.org>
Cc: 72993 <at> debbugs.gnu.org, steven <at> stebalien.com
Subject: bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package
Date: Tue, 03 Sep 2024 15:38:26 +0300
> From: John Wiegley <johnw <at> gnu.org>
> Cc: Steven Allen <steven <at> stebalien.com>,  72993 <at> debbugs.gnu.org
> Date: Mon, 02 Sep 2024 21:37:54 -0700
> 
> >>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> To reproduce:
> >> 
> >> (use-package foo
> >> :hook (eshell-mode . some-function))
> >> 
> >> Previously, `use-package' always appended `-hook' to the hook variable name.
> >> After 4f521fa14c18f57e5207bffd68e9f79454dccc79, `use-package' only does
> >> so if the passed variable name isn't bound. Unfortunately, this breaks
> >> binding mode hooks, e.g.:
> >> 
> >> :hook (some-mode . some-function)
> >> 
> >> Because `some-mode' is usually bound.
> 
> > John, any comments or suggestions?
> 
> Sigh, I should have thought of this. There will be many such collisions, in
> fact.
> 
> Perhaps we should avoid auto -hook’ifying the variable name only if the name
> does not already end in ‘-functions’?

Either that, or maybe exempt FOO-mode from the boundp test.




This bug report was last modified 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.