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 #133 received at 47992 <at> debbugs.gnu.org (full text, mbox):

From: Arthur Miller <arthur.miller <at> live.com>
To: Richard Stallman <rms <at> gnu.org>
Cc: jakanakaevangeli <at> chiru.no, michael_heerdegen <at> web.de, mail <at> daniel-mendler.de,
 47992 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, larsi <at> gnus.org
Subject: Re: bug#47992: 27; 28; Phase out use of `equal` in `add-hook`,
 `remove-hook`
Date: Thu, 08 Jul 2021 04:11:58 +0200
Richard Stallman <rms <at> gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > If they are equal, why do they need to be distinguished?
>
> If file A adds such a hook, then file B adds one that is the same,
> then you unload file B, testing for "the same hook" would
> leave none.  But A won't work right without its hook.
>
> My scheme would put on two distinct but equivalent hooks,
> then delete one of them, leaving the other in place.
> In some cases, that's what you want.

Ok, I understand now. Yes, indeed, put name tag would be one solution to
the problem. It trades memory for cpu time.





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.