From: Eli Zaretskii <eliz@gnu.org>
To: John Wiegley <johnw@gnu.org>
Cc: 72993@debbugs.gnu.org, steven@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 [thread overview]
Message-ID: <86msko7vzx.fsf@gnu.org> (raw)
In-Reply-To: <m2v7zdtkrh.fsf@gnu.org> (message from John Wiegley on Mon, 02 Sep 2024 21:37:54 -0700)
> From: John Wiegley <johnw@gnu.org>
> Cc: Steven Allen <steven@stebalien.com>, 72993@debbugs.gnu.org
> Date: Mon, 02 Sep 2024 21:37:54 -0700
>
> >>>>> Eli Zaretskii <eliz@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.
next prev parent reply other threads:[~2024-09-03 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 2:01 bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-03 2:34 ` Eli Zaretskii
2024-09-03 4:37 ` John Wiegley
2024-09-03 12:38 ` Eli Zaretskii [this message]
2024-09-03 22:35 ` John Wiegley
2024-09-04 11:31 ` Eli Zaretskii
2024-09-04 17:30 ` John Wiegley
2024-09-04 17:44 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86msko7vzx.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=72993@debbugs.gnu.org \
--cc=johnw@gnu.org \
--cc=steven@stebalien.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.