# HG changeset patch # User Stefan Monnier # Date 1155827421 0 # Node ID f13889b471922412c9ff070179f842e6cc674228 # Parent c5805198a5855108bb237f8f294f35707c0c6962 (jit-lock-fontify-now): Protect the modified status of the right buffer. diff -r c5805198a585 -r f13889b47192 lisp/ChangeLog --- a/lisp/ChangeLog Thu Aug 17 14:53:09 2006 +0000 +++ b/lisp/ChangeLog Thu Aug 17 15:10:21 2006 +0000 @@ -1,3 +1,8 @@ +2006-08-17 Martin Rudalics + + * jit-lock.el (jit-lock-fontify-now): Protect the modified status of + the right buffer. + 2006-08-17 Stefan Monnier * pcvs-parse.el (cvs-parse-table): Accept the new `...' format for diff -r c5805198a585 -r f13889b47192 lisp/jit-lock.el --- a/lisp/jit-lock.el Thu Aug 17 14:53:09 2006 +0000 +++ b/lisp/jit-lock.el Thu Aug 17 15:10:21 2006 +0000 @@ -391,9 +391,10 @@ (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 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.