Function: treesit--syntax-propertize-notifier

treesit--syntax-propertize-notifier is a byte-compiled function defined in treesit.el.gz.

Signature

(treesit--syntax-propertize-notifier RANGES PARSER)

Documentation

Sets treesit--syntax-propertize-start to the smallest start.

Specifically, the smallest start position among all the ranges in RANGES for PARSER.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--syntax-propertize-notifier (ranges parser)
  "Sets `treesit--syntax-propertize-start' to the smallest start.
Specifically, the smallest start position among all the ranges in
RANGES for PARSER."
  (with-current-buffer (treesit-parser-buffer parser)
    (when-let* ((range-starts (mapcar #'car ranges))
                (min-range-start
                 (seq-reduce
                  #'min (cdr range-starts) (car range-starts))))
      (if (null treesit--syntax-propertize-start)
          (setq treesit--syntax-propertize-start min-range-start)
        (setq treesit--syntax-propertize-start
              (min treesit--syntax-propertize-start min-range-start))))))