Commit 4fba36ce authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/progmodes/xref.el: Avoid init-args in oref.

* lisp/progmodes/xref.el (xref-location-group, xref-location-marker)
(xref--insert-xrefs, xref-collect-references): Avoid init-args in oref.
parent 94c4e0dc
...@@ -107,7 +107,7 @@ Line numbers start from 1 and columns from 0.") ...@@ -107,7 +107,7 @@ Line numbers start from 1 and columns from 0.")
(point-marker)))))) (point-marker))))))
(cl-defmethod xref-location-group ((l xref-file-location)) (cl-defmethod xref-location-group ((l xref-file-location))
(oref l :file)) (oref l file))
(defclass xref-buffer-location (xref-location) (defclass xref-buffer-location (xref-location)
((buffer :type buffer :initarg :buffer) ((buffer :type buffer :initarg :buffer)
...@@ -139,7 +139,7 @@ actual location is not known.") ...@@ -139,7 +139,7 @@ actual location is not known.")
(make-instance 'xref-bogus-location :message message)) (make-instance 'xref-bogus-location :message message))
(cl-defmethod xref-location-marker ((l xref-bogus-location)) (cl-defmethod xref-location-marker ((l xref-bogus-location))
(user-error "%s" (oref l :message))) (user-error "%s" (oref l message)))
(cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") (cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)")
...@@ -529,7 +529,7 @@ GROUP is a string for decoration purposes and XREF is an ...@@ -529,7 +529,7 @@ GROUP is a string for decoration purposes and XREF is an
for max-line-width = for max-line-width =
(cl-loop for xref in xrefs (cl-loop for xref in xrefs
maximize (let ((line (xref-location-line maximize (let ((line (xref-location-line
(oref xref :location)))) (oref xref location))))
(length (and line (format "%d" line))))) (length (and line (format "%d" line)))))
for line-format = (and max-line-width for line-format = (and max-line-width
(format "%%%dd: " max-line-width)) (format "%%%dd: " max-line-width))
...@@ -733,7 +733,7 @@ tools are used, and when." ...@@ -733,7 +733,7 @@ tools are used, and when."
(let* ((default-directory dir) (let* ((default-directory dir)
(semantic-symref-tool 'detect) (semantic-symref-tool 'detect)
(res (semantic-symref-find-references-by-name symbol 'subdirs)) (res (semantic-symref-find-references-by-name symbol 'subdirs))
(hits (and res (oref res :hit-lines))) (hits (and res (oref res hit-lines)))
(orig-buffers (buffer-list))) (orig-buffers (buffer-list)))
(unwind-protect (unwind-protect
(delq nil (delq nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment