From: Stefan Monnier Date: Sat, 12 Sep 2015 00:32:33 +0000 (-0400) Subject: (jit-lock-deferred-fontify): Pay attention to skipped redisplays X-Git-Tag: emacs-25.0.90~1224^2~149 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e125dce50b2fa1c5f57f6ca00ea679437593bdc4;p=emacs.git (jit-lock-deferred-fontify): Pay attention to skipped redisplays * lisp/jit-lock.el (jit-lock-deferred-fontify): Make sure we refresh the buffers, even if the forced redisplay is interrupted. --- diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 5f9196da645..8c798d5c4d0 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -583,11 +583,13 @@ non-nil in a repeated invocation of this function." 'fontified nil)) (setq pos (next-single-property-change pos 'fontified))))))))) - (setq jit-lock-defer-buffers nil) ;; Force fontification of the visible parts. - (let ((jit-lock-defer-timer nil)) + (let ((buffers jit-lock-defer-buffers) + (jit-lock-defer-timer nil)) + (setq jit-lock-defer-buffers nil) ;; (message "Jit-Defer Now") - (sit-for 0) + (unless (redisplay) ;FIXME: Should we `force'? + (setq jit-lock-defer-buffers buffers)) ;; (message "Jit-Defer Done") )))