415 |
(unless (or executing-kbd-macro |
(unless (or executing-kbd-macro |
416 |
(window-minibuffer-p (selected-window))) |
(window-minibuffer-p (selected-window))) |
417 |
(let ((buffers (buffer-list)) |
(let ((buffers (buffer-list)) |
418 |
|
(outer-buffer (current-buffer)) |
419 |
minibuffer-auto-raise |
minibuffer-auto-raise |
420 |
message-log-max) |
message-log-max) |
421 |
(with-local-quit |
(with-local-quit |
450 |
(point (point-min))) |
(point (point-min))) |
451 |
(while (and (setq start |
(while (and (setq start |
452 |
(jit-lock-stealth-chunk-start point)) |
(jit-lock-stealth-chunk-start point)) |
453 |
(sit-for nice)) |
;; In case sit-for runs any timers, |
454 |
|
;; give them the expected current buffer. |
455 |
|
(with-current-buffer outer-buffer |
456 |
|
(sit-for nice))) |
457 |
|
|
458 |
;; fontify a block. |
;; fontify a block. |
459 |
(jit-lock-fontify-now start (+ start jit-lock-chunk-size)) |
(jit-lock-fontify-now start (+ start jit-lock-chunk-size)) |
465 |
;; Wait a little if load is too high. |
;; Wait a little if load is too high. |
466 |
(when (and jit-lock-stealth-load |
(when (and jit-lock-stealth-load |
467 |
(> (car (load-average)) jit-lock-stealth-load)) |
(> (car (load-average)) jit-lock-stealth-load)) |
468 |
(sit-for (or jit-lock-stealth-time 30))))))))))))) |
;; In case sit-for runs any timers, |
469 |
|
;; give them the expected current buffer. |
470 |
|
(with-current-buffer outer-buffer |
471 |
|
(sit-for (or jit-lock-stealth-time 30)))))))))))))) |
472 |
|
|
473 |
|
|
474 |
|
|