 
 (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

                   for name = (match-string-no-properties 1)
                   for arity = (save-excursion
                                 (erlang-get-arity))
                   for loc = (make-instance 'erlang-xref-location
                                            :file file
                                            :line (line-number-at-pos)
                                            :column 0
                                            :arity arity)
                   for sum = (erlang-xref-summary kind name arity)
                   when (and arity
                             (not (eq arity last-arity)))
                   collect (make-instance 'xref-item
                                          :summary sum
                                          :location loc)
                   do (setq last-arity arity)))))))

(defun erlang-xref-summary (kind tag arity)

      xrefs
    (when (and xrefs
               (fboundp 'xref-item-location)
               (fboundp 'xref-location-group))
      (let (files)
        (cl-loop for xref in xrefs
                 for loc = (xref-item-location xref)
