From a1740a150d2d15189b0e93878845e62a569c257f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Nov 2014 18:30:48 +0200 Subject: Fix error messages from jit-stealth-lock when load-average returns nil. lisp/jit-lock.el (jit-lock-stealth-fontify): Be tolerant to nil being returned by load-average. --- lisp/jit-lock.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/jit-lock.el') diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 42e6519e38c..97df89a12d9 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -503,7 +503,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) -- cgit v1.2.1