 ;; with xref items with xref-etags-location and some deal with xref
 ;; items with erlang-xref-location.
 
+;; NOTE: Around Sept 2021, the xrefs package changed all of its defined types
+;; (i.e.  xref-location, xref-file-location) from EIEIO classes to CL-Lib
+;; structures. These are both supported. Older Emacsen with earlier versions of
+;; xref will continue to use defclass. Newer Emacsen will use cl-defstruct.
+
 (defun erlang-etags--xref-backend () 'erlang-etags)
 
 (defun erlang-soft-require (feature)

        (let ((erlang-replace-etags-tags-completion-table t))
          (tags-completion-table)))

      (defclass erlang-xref-location (xref-file-location)
        ((arity :type fixnum :initarg :arity
                :reader erlang-xref-location-arity))
        :documentation "An erlang location is a file location plus arity.")

      ;; This method definition only calls the superclass which is
      ;; the default behaviour if it was not defined.  It is only


(when (and (erlang-soft-require 'xref)
           (erlang-soft-require 'cl-generic)
           (erlang-soft-require 'cl-lib)
           (erlang-soft-require 'eieio)
           (erlang-soft-require 'etags))
  ;; The purpose of using eval here is to avoid compilation
