mirror of
https://github.com/SqrtMinusOne/elfeed-summary.git
synced 2025-12-10 17:43:03 +03:00
fix: clean up byte-compiled closures from elfeed-update-hooks
This commit is contained in:
parent
6357eb8b1e
commit
6254cb424e
1 changed files with 6 additions and 3 deletions
|
|
@ -1072,10 +1072,12 @@ summary buffer."
|
||||||
;; been updated. But it seems impossible to override this hook with
|
;; been updated. But it seems impossible to override this hook with
|
||||||
;; lexical binding.
|
;; lexical binding.
|
||||||
;; Thus, this function pushes a closure to the hook and cleans it up
|
;; 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
|
(setq elfeed-update-hooks
|
||||||
(seq-filter (lambda (hook)
|
(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))
|
elfeed-update-hooks))
|
||||||
(let* ((elfeed--inhibit-update-init-hooks t)
|
(let* ((elfeed--inhibit-update-init-hooks t)
|
||||||
(remaining-feeds (elfeed-feed-list))
|
(remaining-feeds (elfeed-feed-list))
|
||||||
|
|
@ -1095,7 +1097,8 @@ summary buffer."
|
||||||
(when (seq-empty-p remaining-feeds)
|
(when (seq-empty-p remaining-feeds)
|
||||||
(setq elfeed-update-hooks
|
(setq elfeed-update-hooks
|
||||||
(seq-filter (lambda (hook)
|
(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)))
|
elfeed-update-hooks)))
|
||||||
(when (or (seq-empty-p remaining-feeds)
|
(when (or (seq-empty-p remaining-feeds)
|
||||||
elfeed-summary-refresh-on-each-update)
|
elfeed-summary-refresh-on-each-update)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue