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

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

bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-se


From: jakanakaevangeli
Subject: bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-setup-hook
Date: Tue, 09 Feb 2021 23:13:03 +0100

        (minibuffer-with-setup-hook
            (lambda ())
          (let ((print-circle t))
            (message "%S" (car minibuffer-setup-hook))))

Evaluating this in with lexical-binding enabled, we can see that the
anonymous closure added to the hook indeed contains circular structures.
Since remove-hook uses delete rather than delq, it would probably be a
good idea to have minibuffer-with-setup-hook add a symbol rather than
closure to the hook, just like in set-transient-map.

I believe that set-transient-map was adjusted to use a symbol
(in commit bf1e6ae81df3a2a8f2ba4027c9e96a0097acddc5) for a very similar
reason.





reply via email to

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