diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index 963778e61..11a185fea 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -253,18 +253,18 @@ 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 t (fn! (when-let ((fn (pop fns)) - (fndef (indirect-function fn))) - (if (featurep 'native-compile) - (unless (subr-native-elisp-p fndef) - (doom-log "native-compile: Compiling %s" fn) - (native-compile fn)) - (unless (byte-code-function-p fndef) - (doom-log "byte-compile: Compiling %s" fn) - (byte-compile fn)))) - (unless fns - (cancel-timer (get 'doom-compile-function 'timer)) - (put 'doom-compile-function 'timer nil)))))) + 1.5 t (fn! (when-let ((fn (pop fns)) + (fndef (indirect-function fn))) + (doom-log "compile-functions: %s" fn) + (or (if (featurep 'native-compile) + (or (subr-native-elisp-p fndef) + (ignore-errors (native-compile fn)))) + (byte-code-function-p fndef) + (let (byte-compile-warnings) + (byte-compile fn)))) + (unless fns + (cancel-timer (get 'doom-compile-function 'timer)) + (put 'doom-compile-function 'timer nil)))))) ;;