[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/jit-lock.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/jit-lock.el,v |
Date: |
Thu, 03 Aug 2006 03:35:47 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 06/08/03 03:35:46
Index: jit-lock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/jit-lock.el,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- jit-lock.el 1 Aug 2006 19:01:24 -0000 1.52
+++ jit-lock.el 3 Aug 2006 03:35:45 -0000 1.53
@@ -31,6 +31,8 @@
(eval-when-compile
+ (require 'cl)
+
(defmacro with-buffer-unmodified (&rest body)
"Eval BODY, preserving the current buffer's modified state."
(declare (debug t))
@@ -384,10 +386,14 @@
;; 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 ()
- (put-text-property ',start ',orig-start
- 'fontified t ',(current-buffer)))))
+ 0 nil (lambda ()
+ (with-buffer-prepared-for-jit-lock
+ (put-text-property start orig-start
+ 'fontified t buf))))))
;; Find the start of the next chunk, if any.
(setq start (text-property-any next end 'fontified nil))))))))