bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`


From: Lars Ingebrigtsen
Subject: bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
Date: Mon, 03 May 2021 10:50:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Daniel Mendler <mail@daniel-mendler.de> writes:

> 1. Do almost nothing, but document the behavior of `add/remove-hook`
> more precisely. Add a warning, that the functions should not be used
> with large/cyclic closures and an symbol indirection should be used in
> such scenarios. Generally it should be recommended to add symbols.

I've now added such a recommendation to the add-hook doc string in Emacs
28.

> 2. As you propose we could either add new `add/remove-hook-eq` variants.
> 3. Add an argument to the `add/remove-hook` functions, which allows to
> turn on `eq` equality.

Adding another argument to the functions doesn't seem all that
attractive...  but...  neither does adding a new pair of functions,
really...

I guess the doc change might have to suffice here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]