Function: lazy-lock-fontify-region
lazy-lock-fontify-region is a byte-compiled function defined in
lazy-lock.el.gz.
Signature
(lazy-lock-fontify-region BEG END)
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/lazy-lock.el.gz
;; Fontification functions.
;; If packages want to ensure that some region of the buffer is fontified, they
;; should use this function. For an example, see ps-print.el.
(defun lazy-lock-fontify-region (beg end)
;; Fontify between BEG and END, where necessary, in the current buffer.
(save-restriction
(widen)
(when (setq beg (text-property-any beg end 'lazy-lock nil))
(save-excursion
(with-silent-modifications
(let ((inhibit-point-motion-hooks t))
;; Find successive unfontified regions between BEG and END.
(condition-case data
(do-while beg
(let ((next (or (text-property-any beg end 'lazy-lock t)
end)))
;; Make sure the region end points are at beginning of line.
(goto-char beg)
(unless (bolp)
(beginning-of-line)
(setq beg (point)))
(goto-char next)
(unless (bolp)
(forward-line)
(setq next (point)))
;; Fontify the region, then flag it as fontified.
(font-lock-fontify-region beg next)
(add-text-properties beg next '(lazy-lock t))
(setq beg (text-property-any next end 'lazy-lock nil))))
((error quit) (message "Fontifying region...%s" data)))))))))