mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
(jit-lock-fontify-now): Don't fontify the empty text.
(jit-lock-fontify-again): Don't refontify text that's not displayed.
This commit is contained in:
parent
444a42fd10
commit
c18607470a
@ -1,3 +1,8 @@
|
||||
2006-09-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* 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.
|
||||
|
||||
2006-09-26 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* startup.el (display-splash-screen): Allow a prefix argument.
|
||||
|
@ -349,7 +349,7 @@ Defaults to the whole buffer. END can be out of bounds."
|
||||
;; 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 @@ Defaults to the whole buffer. END can be out of bounds."
|
||||
|
||||
(defun jit-lock-fontify-again (buf start end)
|
||||
"Fontify in buffer BUF from START to END."
|
||||
(with-current-buffer buf
|
||||
(with-buffer-prepared-for-jit-lock
|
||||
(put-text-property start end 'fontified t))))
|
||||
;; 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)))))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user