[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/jit-lock.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/jit-lock.el |
Date: |
Mon, 17 Oct 2005 11:15:34 -0400 |
Index: emacs/lisp/jit-lock.el
diff -c emacs/lisp/jit-lock.el:1.41 emacs/lisp/jit-lock.el:1.42
*** emacs/lisp/jit-lock.el:1.41 Sat Aug 6 22:13:43 2005
--- emacs/lisp/jit-lock.el Mon Oct 17 15:15:31 2005
***************
*** 349,354 ****
--- 349,364 ----
(goto-char next) (setq next (line-beginning-position 2))
(goto-char start) (setq start (line-beginning-position))
+ ;; Make sure the contextual refontification doesn't re-refontify
+ ;; what's already been refontified.
+ (when jit-lock-context-unfontify-pos
+ (if (and (< jit-lock-context-unfontify-pos next)
+ (when (and jit-lock-context-unfontify-pos
+ (< jit-lock-context-unfontify-pos next)
+ (>= jit-lock-context-unfontify-pos start))
+ (setq jit-lock-context-unfontify-pos next)))
+ (setq jit-lock-context-unfontify-pos next))
+
;; Fontify the chunk, and mark it as fontified.
;; We mark it first, to make sure that we don't indefinitely
;; re-execute this fontification if an error occurs.
***************
*** 566,574 ****
;; Mark the change for deferred contextual refontification.
(when jit-lock-context-unfontify-pos
(setq jit-lock-context-unfontify-pos
(min jit-lock-context-unfontify-pos start))))))
(provide 'jit-lock)
! ;;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e
;;; jit-lock.el ends here
--- 576,589 ----
;; Mark the change for deferred contextual refontification.
(when jit-lock-context-unfontify-pos
(setq jit-lock-context-unfontify-pos
+ ;; Here we use `start' because nothing guarantees that the
+ ;; text between start and end will be otherwise refontified:
+ ;; usually it will be refontified by virtue of being
+ ;; displayed, but if it's outside of any displayed area in the
+ ;; buffer, only jit-lock-context-* will re-fontify it.
(min jit-lock-context-unfontify-pos start))))))
(provide 'jit-lock)
! ;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e
;;; jit-lock.el ends here
- [Emacs-diffs] Changes to emacs/lisp/jit-lock.el,
Stefan Monnier <=