summaryrefslogtreecommitdiff
path: root/lisp/jit-lock.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r--lisp/jit-lock.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index d346f050415..34f14a5af63 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -499,7 +499,10 @@ non-nil in a repeated invocation of this function."
message-log-max
start)
(if (and jit-lock-stealth-load
- (> (car (load-average)) jit-lock-stealth-load))
+ ;; load-average can return nil. The w32 emulation does
+ ;; that during the first few dozens of seconds after
+ ;; startup.
+ (> (or (car (load-average)) 0) jit-lock-stealth-load))
;; Wait a little if load is too high.
(setq delay jit-lock-stealth-time)
(if (buffer-live-p buffer)