]> git.eshelyaron.com Git - emacs.git/commitdiff
(jit-lock-fontify-again): New function.
authorKim F. Storm <storm@cua.dk>
Thu, 14 Sep 2006 11:08:50 +0000 (11:08 +0000)
committerKim F. Storm <storm@cua.dk>
Thu, 14 Sep 2006 11:08:50 +0000 (11:08 +0000)
(jit-lock-fontify-now): Use it instead of lambda form.

lisp/jit-lock.el

index 89959ad85251f3977d6d5cf711448e998de27094..4cbc7da4511ab5268d0b91ff586740b56873e7b6 100644 (file)
@@ -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))))
+
+
 \f
 ;;; Stealth fontification.