all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <johnw@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72993@debbugs.gnu.org, Steven Allen <steven@stebalien.com>
Subject: bug#72993: 31.0.50; 4f521fa14c18f57e5207bffd68e9f79454dccc79 breaks binding mode hooks in use-package
Date: Mon, 02 Sep 2024 21:37:54 -0700	[thread overview]
Message-ID: <m2v7zdtkrh.fsf@gnu.org> (raw)
In-Reply-To: <86v7zd79ds.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 03 Sep 2024 05:34:39 +0300")

>>>>> 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’?

What do you think, Eli?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





  reply	other threads:[~2024-09-03  4:37 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 [this message]
2024-09-03 12:38     ` Eli Zaretskii
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=m2v7zdtkrh.fsf@gnu.org \
    --to=johnw@gnu.org \
    --cc=72993@debbugs.gnu.org \
    --cc=eliz@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.