GNU bug report logs - #46407
27.1; Hooks with permanent-local-hook are not cleared of lambdas

Previous Next

Package: emacs;

Reported by: jakanakaevangeli <jakanakaevangeli <at> chiru.no>

Date: Tue, 9 Feb 2021 20:01:01 UTC

Severity: normal

Tags: patch

Found in version 27.1

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: <jakanakaevangeli <at> chiru.no>
Cc: 46407 <at> debbugs.gnu.org
Subject: Re: bug#46407: 27.1; Hooks with permanent-local-hook are not
 cleared of lambdas
Date: Tue, 25 May 2021 21:10:04 +0200
<jakanakaevangeli <at> chiru.no> writes:

> On the other hand, this side effect is so undocumented and
> undiscoverable (and most probably not really of any use as well), that I
> highly doubt there is even a single instance of anyone relying in it
> deliberately. I may be wrong though.

Yeah, that's the problem -- it's hard to say whether anybody relies on
this weird behaviour.

There are no in-tree usages of permanent-local-hook at all as far as I
can see, so I wondered whether is was used at all:

https://github.com/search?q=permanent-local-hook+extension%3A.el&type=Code&ref=advsearch&l=&l=

And the answer is yes.  (But that doesn't tell us if anybody relies on
the non-symbol behaviour, though.)

> I'm personally in favour of fixing the `kill-all-local-variables'
> inconsistency (patch follows).
>
> If not, then yes, we should document it in add-hook and fix the info
> node I mentioned. Though that would leave virtually every local addition
> of a lambda to a hook invalid and a possible bug (a quick grep reveals
> that there are at least three such usages in Emacs itself).

I'm leaning towards applying your patch (i.e., changing the behaviour as
you suggest), because it's somewhat difficult to imagine anybody relying
on the current, odd behaviour.

Does anybody object?

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




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

Previous Next


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