summaryrefslogtreecommitdiff
path: root/lisp/jit-lock.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-09-14 11:08:50 +0000
committerKim F. Storm <storm@cua.dk>2006-09-14 11:08:50 +0000
commit2a8edf31ec2558f7e9899e6089dad31df257195f (patch)
tree0fdb360636373c515ba815f689145a14051c6feb /lisp/jit-lock.el
parent36961efd6733a28246293bcae4c992018f9be3d2 (diff)
downloademacs-2a8edf31ec2558f7e9899e6089dad31df257195f.tar.gz
(jit-lock-fontify-again): New function.
(jit-lock-fontify-now): Use it instead of lambda form.
Diffstat (limited to 'lisp/jit-lock.el')
-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."
;; eagerly extend the refontified region with
;; jit-lock-after-change-extend-region-functions.
(when (< start orig-start)
- (lexical-let ((start start)
- (orig-start orig-start)
- (buf (current-buffer)))
- (run-with-timer
- 0 nil (lambda ()
- (with-current-buffer buf
- (with-buffer-prepared-for-jit-lock
- (put-text-property start orig-start
- 'fontified t)))))))
+ (run-with-timer 0 nil 'jit-lock-fontify-again
+ (current-buffer) start orig-start))
;; Find the start of the next chunk, if any.
(setq start (text-property-any next end 'fontified nil))))))))
+(defun jit-lock-fontify-again (buf start end)
+ "Fontify in buffer BUF from START to END."
+ (with-current-buffer buf
+ (with-buffer-prepared-for-jit-lock
+ (put-text-property start end 'fontified t))))
+
+
;;; Stealth fontification.