[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: |
Tue, 26 Sep 2006 15:35:36 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 06/09/26 15:35:35
Index: jit-lock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/jit-lock.el,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- jit-lock.el 14 Sep 2006 11:08:50 -0000 1.56
+++ jit-lock.el 26 Sep 2006 15:35:34 -0000 1.57
@@ -349,7 +349,7 @@
;; Fontify chunks beginning at START. The end of a
;; chunk is either `end', or the start of a region
;; before `end' that has already been fontified.
- (while start
+ (while (and start (< start end))
;; Determine the end of this chunk.
(setq next (or (text-property-any start end 'fontified t)
end))
@@ -405,9 +405,11 @@
(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 t))))
+ (put-text-property start end 'fontified nil)))))