> From: John Wiegley <jo...@gnu.org>
> Cc: Steven Allen <ste...@stebalien.com>,  72...@debbugs.gnu.org
> Date: Mon, 02 Sep 2024 21:37:54 -0700
> 
> >>>>> Eli Zaretskii <e...@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.



  • bug#72993:... Bug reports for GNU Emacs, the Swiss army knife of text editors
    • bug#7... Eli Zaretskii
      • b... John Wiegley
        • ... Eli Zaretskii
          • ... John Wiegley
            • ... Eli Zaretskii
              • ... John Wiegley
                • ... Eli Zaretskii

Reply via email to