View | Details | Raw Unified | Return to bug 260041
Collapse All | Expand All

(-)file_not_specified_in_diff (-23 / +32 lines)
Lines 5123-5124 Link Here
5123
;; etags information structures (class xref-etags-location) will be
5123
;; etags information structures (struct xref-etags-location) will be
5124
;; translated to our own structures which include arity (class
5124
;; translated to our own structures which include arity (struct
5125
--
Line 5132 Link Here
5132
;; NOTE: Around Sept 2021, the xrefs package changed all of its defined types
5133
;; (i.e.  xref-location, xref-file-location) from EIEIO classes to CL-Lib
5134
;; structures. These are both supported. Older Emacsen with earlier versions of
5135
;; xref will continue to use defclass. Newer Emacsen will use cl-defstruct.
5136
Line 5140 Link Here
5145
           (erlang-soft-require 'cl-lib)
Lines 5168-5171 Link Here
5168
      (defclass erlang-xref-location (xref-file-location)
5174
      ;; Xref 1.3.1 bundled with Emacs 28+ switched from using EIEIO classes to
5169
        ((arity :type fixnum :initarg :arity
5175
      ;; using CL-Lib structs.
5170
                :reader erlang-xref-location-arity))
5176
      (if (find-class 'xref-file-location)
5171
        :documentation "An erlang location is a file location plus arity.")
5177
          (progn
5172
--
5178
            (defclass erlang-xref-location (xref-file-location)
5179
              ((arity :type fixnum :initarg :arity
5180
                      :reader erlang-xref-location-arity))
5181
              :documentation "An erlang location is a file location plus arity.")
5182
            ;; Make a constructor with the same name that a CL structure would have.
5183
            (defalias 'make-erlang-xref-location 'erlang-xref-location))
5184
        (cl-defstruct (erlang-xref-location
5185
                       (:include xref-file-location))
5186
          "An erlang location is a file location plus arity."
5187
          (arity 0 :type fixnum)))
Lines 5334-5335 Link Here
5334
               (fboundp 'xref-location-group)
5350
               (fboundp 'xref-location-group))
5335
               (fboundp 'slot-value))
5336
--
Line 5360 Link Here
5360
  (when (fboundp 'make-instance)
5375
  (when (and (fboundp 'make-erlang-xref-location)
5361
--
5376
             (fboundp 'xref-make))
Lines 5372-5376 Link Here
5372
                   for loc = (make-instance 'erlang-xref-location
5388
                   for loc = (make-erlang-xref-location
5373
                                            :file file
5389
                              :file file
5374
                                            :line (line-number-at-pos)
5390
                              :line (line-number-at-pos)
5375
                                            :column 0
5391
                              :column 0
5376
                                            :arity arity)
5392
                              :arity arity)
5377
--
Lines 5380-5382 Link Here
5380
                   collect (make-instance 'xref-item
5396
                   collect (xref-make sum loc)
5381
                                          :summary sum
5382
                                          :location loc)
5383
--
Line 6304 Link Here
6318

Return to bug 260041