emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e125dce: (jit-lock-deferred-fontify): Pay attention


From: Stefan Monnier
Subject: [Emacs-diffs] master e125dce: (jit-lock-deferred-fontify): Pay attention to skipped redisplays
Date: Sat, 12 Sep 2015 00:32:36 +0000

branch: master
commit e125dce50b2fa1c5f57f6ca00ea679437593bdc4
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    (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.
---
 lisp/jit-lock.el |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 5f9196d..8c798d5 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")
       )))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]