Function: font-lock-fontify-syntactic-anchored-keywords
font-lock-fontify-syntactic-anchored-keywords is a byte-compiled
function defined in font-lock.el.gz.
Signature
(font-lock-fontify-syntactic-anchored-keywords KEYWORDS LIMIT)
Documentation
Fontify according to KEYWORDS until LIMIT.
KEYWORDS should be of the form MATCH-ANCHORED, see font-lock-keywords,
LIMIT can be modified by the value of its PRE-MATCH-FORM.
Source Code
;; Defined in /usr/src/emacs/lisp/font-lock.el.gz
(defun font-lock-fontify-syntactic-anchored-keywords (keywords limit)
"Fontify according to KEYWORDS until LIMIT.
KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
LIMIT can be modified by the value of its PRE-MATCH-FORM."
(let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights
;; Evaluate PRE-MATCH-FORM.
(pre-match-value (eval (nth 1 keywords))))
;; Set LIMIT to value of PRE-MATCH-FORM or the end of line.
(if (and (numberp pre-match-value) (> pre-match-value (point)))
(setq limit pre-match-value)
(setq limit (line-end-position)))
(save-match-data
;; Find an occurrence of `matcher' before `limit'.
(while (if (stringp matcher)
(re-search-forward matcher limit t)
(funcall matcher limit))
;; Apply each highlight to this instance of `matcher'.
(setq highlights lowdarks)
(while highlights
(font-lock-apply-syntactic-highlight (car highlights))
(setq highlights (cdr highlights)))))
;; Evaluate POST-MATCH-FORM.
(eval (nth 2 keywords))))