Function: xref--search-property

xref--search-property is a byte-compiled function defined in xref.el.gz.

Signature

(xref--search-property PROPERTY &optional BACKWARD)

Documentation

Search the next text range where text property PROPERTY is non-nil.

Return the value of PROPERTY. If BACKWARD is non-nil, search backward.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(defun xref--search-property (property &optional backward)
    "Search the next text range where text property PROPERTY is non-nil.
Return the value of PROPERTY.  If BACKWARD is non-nil, search
backward."
  (let ((next (if backward
                  #'previous-single-char-property-change
                #'next-single-char-property-change))
        (start (point))
        (value nil))
    (while (progn
             (goto-char (funcall next (point) property))
             (not (or (setq value (get-text-property (point) property))
                      (eobp)
                      (bobp)))))
    (cond (value)
          (t (goto-char start) nil))))