From fe602fe9cd4f2af616a57cc9b2928d7e83727a7a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 16 Sep 2022 19:19:55 +0200 Subject: [PATCH] fix(lib): suppress 'Function X is already compiled' Emitted from `byte-compile`. --- lisp/doom-lib.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index 11a185fea..417557ba5 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -253,13 +253,12 @@ TRIGGER-HOOK is a list of quoted hooks and/or sharp-quoted functions." "Queue FNS to be byte/natively-compiled after a brief delay." (with-memoization (get 'doom-compile-function 'timer) (run-with-idle-timer - 1.5 t (fn! (when-let ((fn (pop fns)) - (fndef (indirect-function fn))) + 1.5 t (fn! (when-let (fn (pop fns)) (doom-log "compile-functions: %s" fn) (or (if (featurep 'native-compile) - (or (subr-native-elisp-p fndef) + (or (subr-native-elisp-p (indirect-function fn)) (ignore-errors (native-compile fn)))) - (byte-code-function-p fndef) + (byte-code-function-p fn) (let (byte-compile-warnings) (byte-compile fn)))) (unless fns