1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(jit-lock-function): Check for the actual defer-timer rather than just

defer-time, in case defer-time has been changed but the timer isn't running yet.
(jit-lock-deferred-fontify): Correspondingly let-bind defer-timer.
This commit is contained in:
Stefan Monnier 2006-03-20 07:52:03 +00:00
parent 95c1c9018e
commit 0902822d85
2 changed files with 235 additions and 256 deletions

File diff suppressed because it is too large Load diff

View file

@ -301,7 +301,7 @@ Only applies to the current buffer."
This function is added to `fontification-functions' when `jit-lock-mode'
is active."
(when (and jit-lock-mode (not memory-full))
(if (null jit-lock-defer-time)
(if (null jit-lock-defer-timer)
;; No deferral.
(jit-lock-fontify-now start (+ start jit-lock-chunk-size))
;; Record the buffer for later fontification.
@ -510,7 +510,7 @@ This functions is called after Emacs has been idle for
(setq pos (next-single-property-change pos 'fontified)))))))))
(setq jit-lock-defer-buffers nil)
;; Force fontification of the visible parts.
(let ((jit-lock-defer-time nil))
(let ((jit-lock-defer-timer nil))
;; (message "Jit-Defer Now")
(sit-for 0)
;; (message "Jit-Defer Done")