Function: jit-lock--run-functions

jit-lock--run-functions is a byte-compiled function defined in jit-lock.el.gz.

Signature

(jit-lock--run-functions BEG END)

Source Code

;; Defined in /usr/src/emacs/lisp/jit-lock.el.gz
(defun jit-lock--run-functions (beg end)
  (let ((tight-beg nil) (tight-end nil)
        (loose-beg beg) (loose-end end))
    (run-hook-wrapped
     'jit-lock-functions
     (lambda (fun)
       (pcase-let*
           ((res (funcall fun beg end))
            (`(,this-beg . ,this-end)
             (if (eq (car-safe res) 'jit-lock-bounds)
                 (cdr res) (cons beg end))))
         ;; If all functions don't fontify the same region, we currently
         ;; just try to "still be correct".  But we could go further and for
         ;; the chunks of text that was fontified by some functions but not
         ;; all, we could add text-properties indicating which functions were
         ;; already run to avoid running them redundantly when we get to
         ;; those chunks.
         (setq tight-beg (max (or tight-beg (point-min)) this-beg))
         (setq tight-end (min (or tight-end (point-max)) this-end))
         (setq loose-beg (min loose-beg this-beg))
         (setq loose-end (max loose-end this-end))
         nil)))
    `(,(min tight-beg beg) ,(max tight-end end) ,loose-beg ,loose-end)))