From 2bce9dbc1ad1e84641625a8d7d794f9644d58b21 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Mar 2024 15:57:31 -0500 Subject: [PATCH] fix: doom-incremental-first-idle-timer: type error when nil If the user uses the doom-load-packages-incrementally function directly, and has set doom-incremental-first-idle-timer set to nil, it will throw a type error. Close: #7710 --- lisp/doom-start.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 5a68dd036..e52624bcf 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -199,7 +199,7 @@ in daemon sessions (they are loaded immediately at startup).") (defvar doom-incremental-first-idle-timer (if (daemonp) 0 2.0) "How long (in idle seconds) until incremental loading starts. -Set this to nil to disable incremental loading. +Set this to nil to disable incremental loading at startup. Set this to 0 to load all incrementally deferred packages immediately at `emacs-startup-hook'.") @@ -222,7 +222,7 @@ intervals." (condition-case-unless-debug e (and (or (null (setq idle-time (current-idle-time))) - (< (float-time idle-time) doom-incremental-first-idle-timer) + (< (float-time idle-time) (or doom-incremental-first-idle-timer 0.0)) (not (while-no-input (doom-log "start:iloader: Loading %s (%d left)" req (length packages))