Function: markdown-range-property-any

markdown-range-property-any is a natively compiled function defined in markdown-mode.el.

Signature

(markdown-range-property-any BEGIN END PROP PROP-VALUES)

Documentation

Return t if PROP from BEGIN to END is equal to one of the given PROP-VALUES.

Also returns t if PROP is a list containing one of the PROP-VALUES. Return nil otherwise.

Source Code

;; Defined in /nix/store/p33zgg95aglc47pl6zlgs43vki0snxf8-emacs-packages-deps/share/emacs/site-lisp/elpa/markdown-mode-20260827.909/markdown-mode.el
;;; Markdown Font Lock Matching Functions =====================================

(defun markdown-range-property-any (begin end prop prop-values)
  "Return t if PROP from BEGIN to END is equal to one of the given PROP-VALUES.
Also returns t if PROP is a list containing one of the PROP-VALUES.
Return nil otherwise."
  (catch 'found
    (let ((loc begin))
      (while (<= loc end)
        (when-let* ((props (get-text-property loc prop)))
          (if (listp props)
              ;; props is a list, check for membership
              (dolist (val prop-values)
                (when (memq val props) (throw 'found loc)))
            (dolist (val prop-values)
              (when (eq val props) (throw 'found loc)))))
        (setq loc (next-single-property-change loc prop nil (1+ end)))))))