aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-09-26 15:42:29 +0000
committerStefan Monnier2006-09-26 15:42:29 +0000
commitbe95632401272554023bbf4f4624cfb850ddb709 (patch)
treec195a4cdb131fda83aa6f9d18eadb61e1017b4e0
parentc18607470a2be92f7ff828121f3284ef116b756d (diff)
downloademacs-be95632401272554023bbf4f4624cfb850ddb709.tar.gz
emacs-be95632401272554023bbf4f4624cfb850ddb709.zip
(jit-lock-force-redisplay): Rename from jit-lock-fontify-again.
Undo the mistaken change I've just done.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/jit-lock.el16
2 files changed, 11 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7c78cae799..ca56347c6cb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12006-09-26 Stefan Monnier <monnier@iro.umontreal.ca> 12006-09-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * jit-lock.el (jit-lock-force-redisplay): Rename from
4 jit-lock-fontify-again, and undo the mistaken change I've just done.
5
3 * jit-lock.el (jit-lock-fontify-now): Don't fontify the empty text. 6 * jit-lock.el (jit-lock-fontify-now): Don't fontify the empty text.
4 (jit-lock-fontify-again): Don't refontify text that's not displayed. 7 (jit-lock-fontify-again): Don't refontify text that's not displayed.
5 8
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 612641d0954..020b651bfea 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."
397 ;; eagerly extend the refontified region with 397 ;; eagerly extend the refontified region with
398 ;; jit-lock-after-change-extend-region-functions. 398 ;; jit-lock-after-change-extend-region-functions.
399 (when (< start orig-start) 399 (when (< start orig-start)
400 (run-with-timer 0 nil 'jit-lock-fontify-again 400 (run-with-timer 0 nil 'jit-lock-force-redisplay
401 (current-buffer) start orig-start)) 401 (current-buffer) start orig-start))
402 402
403 ;; Find the start of the next chunk, if any. 403 ;; Find the start of the next chunk, if any.
404 (setq start (text-property-any next end 'fontified nil)))))))) 404 (setq start (text-property-any next end 'fontified nil))))))))
405 405
406(defun jit-lock-fontify-again (buf start end) 406(defun jit-lock-force-redisplay (buf start end)
407 "Fontify in buffer BUF from START to END." 407 "Force the display engine to re-render buffer BUF from START to END."
408 ;; Don't bother refontifying text that's not even displayed. 408 (with-current-buffer buf
409 (when (setq start (text-property-not-all start end 'fontified nil buf)) 409 (with-buffer-prepared-for-jit-lock
410 (with-current-buffer buf 410 ;; Don't cause refontification (it's already been done), but just do
411 (with-buffer-prepared-for-jit-lock 411 ;; some random buffer change, so as to force redisplay.
412 (put-text-property start end 'fontified nil))))) 412 (put-text-property start end 'fontified t)))))
413 413
414 414
415 415