aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-09-14 11:08:50 +0000
committerKim F. Storm2006-09-14 11:08:50 +0000
commit2a8edf31ec2558f7e9899e6089dad31df257195f (patch)
tree0fdb360636373c515ba815f689145a14051c6feb
parent36961efd6733a28246293bcae4c992018f9be3d2 (diff)
downloademacs-2a8edf31ec2558f7e9899e6089dad31df257195f.tar.gz
emacs-2a8edf31ec2558f7e9899e6089dad31df257195f.zip
(jit-lock-fontify-again): New function.
(jit-lock-fontify-now): Use it instead of lambda form.
-rw-r--r--lisp/jit-lock.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 89959ad8525..4cbc7da4511 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -397,19 +397,19 @@ Defaults to the whole buffer. END can be out of bounds."
397 ;; eagerly extend the refontified region with 397 ;; eagerly extend the refontified region with
398 ;; jit-lock-after-change-extend-region-functions. 398 ;; jit-lock-after-change-extend-region-functions.
399 (when (< start orig-start) 399 (when (< start orig-start)
400 (lexical-let ((start start) 400 (run-with-timer 0 nil 'jit-lock-fontify-again
401 (orig-start orig-start) 401 (current-buffer) start orig-start))
402 (buf (current-buffer)))
403 (run-with-timer
404 0 nil (lambda ()
405 (with-current-buffer buf
406 (with-buffer-prepared-for-jit-lock
407 (put-text-property start orig-start
408 'fontified t)))))))
409 402
410 ;; Find the start of the next chunk, if any. 403 ;; Find the start of the next chunk, if any.
411 (setq start (text-property-any next end 'fontified nil)))))))) 404 (setq start (text-property-any next end 'fontified nil))))))))
412 405
406(defun jit-lock-fontify-again (buf start end)
407 "Fontify in buffer BUF from START to END."
408 (with-current-buffer buf
409 (with-buffer-prepared-for-jit-lock
410 (put-text-property start end 'fontified t))))
411
412
413 413
414;;; Stealth fontification. 414;;; Stealth fontification.
415 415