fix(lib): suppress 'Function X is already compiled'

Emitted from `byte-compile`.
This commit is contained in:
Henrik Lissner 2022-09-16 19:19:55 +02:00
parent 51a9745f38
commit fe602fe9cd
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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." "Queue FNS to be byte/natively-compiled after a brief delay."
(with-memoization (get 'doom-compile-function 'timer) (with-memoization (get 'doom-compile-function 'timer)
(run-with-idle-timer (run-with-idle-timer
1.5 t (fn! (when-let ((fn (pop fns)) 1.5 t (fn! (when-let (fn (pop fns))
(fndef (indirect-function fn)))
(doom-log "compile-functions: %s" fn) (doom-log "compile-functions: %s" fn)
(or (if (featurep 'native-compile) (or (if (featurep 'native-compile)
(or (subr-native-elisp-p fndef) (or (subr-native-elisp-p (indirect-function fn))
(ignore-errors (native-compile fn)))) (ignore-errors (native-compile fn))))
(byte-code-function-p fndef) (byte-code-function-p fn)
(let (byte-compile-warnings) (let (byte-compile-warnings)
(byte-compile fn)))) (byte-compile fn))))
(unless fns (unless fns