summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-09-11 20:32:33 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-09-11 20:32:33 -0400
commite125dce50b2fa1c5f57f6ca00ea679437593bdc4 (patch)
tree239150ecbe77ffa2de8a2e6d12cc8a2c39891e95
parentb2615c753ba9b332b4062b3aef1bf96b57c18215 (diff)
downloademacs-e125dce50b2fa1c5f57f6ca00ea679437593bdc4.tar.gz
(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.
-rw-r--r--lisp/jit-lock.el8
1 files changed, 5 insertions, 3 deletions
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")
)))