From 6254cb424edde85fedae35babe8d97c28fb020b8 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Tue, 3 May 2022 10:15:52 +0300 Subject: [PATCH] fix: clean up byte-compiled closures from elfeed-update-hooks --- elfeed-summary.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/elfeed-summary.el b/elfeed-summary.el index 40d433d..ac24eee 100644 --- a/elfeed-summary.el +++ b/elfeed-summary.el @@ -1072,10 +1072,12 @@ summary buffer." ;; been updated. But it seems impossible to override this hook with ;; lexical binding. ;; Thus, this function pushes a closure to the hook and cleans it up - ;; afterwards. + ;; afterwards. Also, a closure is occasionally byte-compiled, so + ;; this is checked by `byte-code-function-p'. (setq elfeed-update-hooks (seq-filter (lambda (hook) - (not (and (listp hook) (eq (car hook) 'closure)))) + (not (or (and (listp hook) (eq (car hook) 'closure)) + (byte-code-function-p hook)))) elfeed-update-hooks)) (let* ((elfeed--inhibit-update-init-hooks t) (remaining-feeds (elfeed-feed-list)) @@ -1095,7 +1097,8 @@ summary buffer." (when (seq-empty-p remaining-feeds) (setq elfeed-update-hooks (seq-filter (lambda (hook) - (not (and (listp hook) (eq (car hook) 'closure)))) + (not (or (and (listp hook) (eq (car hook) 'closure)) + (byte-code-function-p hook)))) elfeed-update-hooks))) (when (or (seq-empty-p remaining-feeds) elfeed-summary-refresh-on-each-update)