summaryrefslogtreecommitdiff
path: root/lisp/jit-lock.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2006-08-17 15:10:21 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2006-08-17 15:10:21 +0000
commit9fd762b0633b14c6d065b2b448f57a2d62663ad6 (patch)
treef22281e23dcfa8580a2da0c481809539edad9b51 /lisp/jit-lock.el
parentbce848ed515d75ccc24c7ea54b7ac72dbba6a630 (diff)
downloademacs-9fd762b0633b14c6d065b2b448f57a2d62663ad6.tar.gz
(jit-lock-fontify-now): Protect the modified status of the right buffer.
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r--lisp/jit-lock.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 4d7afe8c33f..606cd1e0b84 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -391,9 +391,10 @@ Defaults to the whole buffer. END can be out of bounds."
(buf (current-buffer)))
(run-with-timer
0 nil (lambda ()
- (with-buffer-prepared-for-jit-lock
- (put-text-property start orig-start
- 'fontified t buf))))))
+ (with-current-buffer buf
+ (with-buffer-prepared-for-jit-lock
+ (put-text-property start orig-start
+ 'fontified t)))))))
;; Find the start of the next chunk, if any.
(setq start (text-property-any next end 'fontified nil))))))))
@@ -577,10 +578,10 @@ the three arguments of `after-change-functions': START END OLD-LEN.
The extended region to refontify is returned indirectly by modifying
the variables `jit-lock-start' and `jit-lock-end'.
-Note that extending the region this way is not strictly necessary,
-except that the nature of the redisplay code tends to otherwise leave
-some of the rehighlighted text displayed with the old highlight until the
-next redisplay. See comment in `jit-lock-fontify-now'.")
+Note that extending the region this way is not strictly necessary, except
+that the nature of the redisplay code tends to otherwise leave some of
+the rehighlighted text displayed with the old highlight until the next
+redisplay (see comment about repeated redisplay in `jit-lock-fontify-now').")
(defun jit-lock-after-change (start end old-len)
"Mark the rest of the buffer as not fontified after a change.