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

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sat, 24 Apr 2021 12:12:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 47992 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>, Stefan Monnier
 <monnier <at> iro.umontreal.ca>
Cc: "jakanakaevangeli <at> chiru.no" <jakanakaevangeli <at> chiru.no>,
 "47992 <at> debbugs.gnu.org" <47992 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#47992: 27; 28; Phase out use of `equal` in
 `add-hook`, `remove-hook`
Date: Sun, 25 Apr 2021 01:16:40 +0000
> The structural equality does not even perform alpha
> conversion.
> This is probably due to how binding works in Elisp?
> 
> (equal (lambda (x) x) (lambda (y) y))

Right.  Which is, again, why we advise users not to
use lambda forms as hook functions.  But some do,
and if they do they soon learn that if they want to
remove the hook they need to provide a sexp that's
`equal' - a lambda form as an `equal' list.


This bug report was last modified 3 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.