File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1616(cl-defmethod xref-backend-references ((_backend (eql merlin-xref)) symbol)
1717 (mapcar
1818 (lambda (loc )
19- (let ((pt (merlin-make-point (alist-get 'start loc))))
20- (xref-make (merlin-xref--line pt)
21- (xref-make-buffer-location (current-buffer ) pt))))
19+ (let* ((pt (merlin-make-point (alist-get 'start loc)))
20+ (summary (merlin-xref--line pt))
21+ (location (xref-make-buffer-location (current-buffer ) pt)))
22+ (if (>= emacs-major-version 28 )
23+ ; ; `xref-make-match' doesn't accept `xref-buffer-location'
24+ ; ; arguments until Emacs 28.
25+ (let ((length (- (merlin-make-point (alist-get 'end loc)) pt)))
26+ (xref-make-match summary location length ))
27+ (xref-make summary location))))
2228 (save-excursion
2329 (let ((pt (get-text-property 0 'merlin-xref-point symbol)))
2430 (when pt
You can’t perform that action at this time.
0 commit comments