bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package
>>>>> Eli Zaretskii 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’? What do you think, Eli? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package
>>>>> Eli Zaretskii writes: >> 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 sounds likely to be even better. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package
>>>>> Eli Zaretskii writes: > Like the below? Yes, looks good! Thank you, Eli. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2