From: Stefan Monnier Date: Tue, 26 Sep 2006 15:42:29 +0000 (+0000) Subject: (jit-lock-force-redisplay): Rename from jit-lock-fontify-again. X-Git-Tag: emacs-pretest-22.0.90~332 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be95632401272554023bbf4f4624cfb850ddb709;p=emacs.git (jit-lock-force-redisplay): Rename from jit-lock-fontify-again. Undo the mistaken change I've just done. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7c78cae799..ca56347c6cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-09-26 Stefan Monnier + * jit-lock.el (jit-lock-force-redisplay): Rename from + jit-lock-fontify-again, and undo the mistaken change I've just done. + * jit-lock.el (jit-lock-fontify-now): Don't fontify the empty text. (jit-lock-fontify-again): Don't refontify text that's not displayed. 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." ;; eagerly extend the refontified region with ;; jit-lock-after-change-extend-region-functions. (when (< start orig-start) - (run-with-timer 0 nil 'jit-lock-fontify-again + (run-with-timer 0 nil 'jit-lock-force-redisplay (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." - ;; Don't bother refontifying text that's not even displayed. - (when (setq start (text-property-not-all start end 'fontified nil buf)) - (with-current-buffer buf - (with-buffer-prepared-for-jit-lock - (put-text-property start end 'fontified nil))))) +(defun jit-lock-force-redisplay (buf start end) + "Force the display engine to re-render buffer BUF from START to END." + (with-current-buffer buf + (with-buffer-prepared-for-jit-lock + ;; Don't cause refontification (it's already been done), but just do + ;; some random buffer change, so as to force redisplay. + (put-text-property start end 'fontified t)))))