+(defclass xref-match-item ()
+ ((summary :type string :initarg :summary
+ :reader xref-item-summary)
+ (location :initarg :location
+ :type xref-file-location
+ :reader xref-item-location)
+ (end-column :initarg :end-column))
+ :comment "An xref item describes a reference to a location
+somewhere.")
+
+(cl-defmethod xref-match-bounds ((i xref-match-item))
+ (with-slots (end-column location) i
+ (cons (xref-file-location-column location)
+ end-column)))
+
+(defun xref-make-match (summary end-column location)
+ "Create and return a new xref match item.
+SUMMARY is a short string to describe the xref.
+END-COLUMN is the match end column number inside SUMMARY.
+LOCATION is an `xref-location'."
+ (make-instance 'xref-match-item :summary summary :location location
+ :end-column end-column))
+