Function: c-fontify-new-found-type
c-fontify-new-found-type is a byte-compiled function defined in
cc-fonts.el.gz.
Signature
(c-fontify-new-found-type TYPE)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-fonts.el.gz
(defun c-fontify-new-found-type (type)
;; Cause the fontification of TYPE, a string, wherever it occurs in the
;; buffer. If TYPE is currently displayed in a window, cause redisplay to
;; happen "instantaneously". These actions are done only when jit-lock-mode
;; is active.
(when (and font-lock-mode
(boundp 'font-lock-support-mode)
(eq font-lock-support-mode 'jit-lock-mode))
(c-save-buffer-state
((window-boundaries
(mapcar (lambda (win)
(cons (window-start win)
(window-end win)))
(get-buffer-window-list (current-buffer) 'no-mini t)))
(target-re (concat "\\_<" type "\\_>")))
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(while (re-search-forward target-re nil t)
(when (and
(get-text-property (match-beginning 0) 'fontified)
(not (memq (c-get-char-property (match-beginning 0) 'face)
c-literal-faces)))
(put-text-property (match-beginning 0) (match-end 0)
'fontified nil))
(dolist (win-boundary window-boundaries)
(when (and (< (match-beginning 0) (cdr win-boundary))
(> (match-end 0) (car win-boundary))
(not c-re-redisplay-timer))
(setq c-re-redisplay-timer
(run-with-timer 0 nil #'c-force-redisplay
(current-buffer)
(match-beginning 0) (match-end 0)))))))))))