GNU bug report logs -
#48666
Leaks are still possible in hook--depth-alist
Previous Next
Reported by: jakanakaevangeli <at> chiru.no
Date: Wed, 26 May 2021 08:53:02 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48666 <at> debbugs.gnu.org (full text, mbox):
jakanakaevangeli <at> chiru.no [2021-05-26 10:57:47] wrote:
> (with-temp-buffer
> (add-hook 'post-command-hook (make-symbol "fun-sym") 77 t))
> (get 'post-command-hook 'hook--depth-alist)
> Perhaps hook--depth-alist could be a hash table with weak keys.
I just pushed to `master` a patch which should hopefully fix this
problem for good (basically, the depth alist is now kept in an(other)
variable (so for functions added to the buffer-local portion of the
hook, the depth is stored in the buffer-local portion of the depth
variable)).
I hope it will also fix the problems seen in
https://github.com/minad/corfu/issues/133
It makes it a bit harder to check if the old problem is still present or
not, OTOH, because the depth-alist isn't just a quick (get <hook>
'hook--depth-alist) away but you need to (symbol-value (get <hook>
'hook--depth-alist)) and that will only show you the global portion or
the portion relevant to the current buffer.
Stefan
This bug report was last modified 2 years and 311 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.