* lisp/progmodes/xref.el (xref-find-definitions-at-mouse)
(xref-find-references-at-mouse): Call mouse-set-point to ensure
that the search is initiated at the same place where
xref-backend-identifier-at-point was called (bug#65578).
(mouse-set-point event)
(xref-backend-identifier-at-point (xref-find-backend)))))
(if identifier
- (xref-find-definitions identifier)
+ (progn
+ (mouse-set-point event)
+ (xref-find-definitions identifier))
(user-error "No identifier here"))))
;;;###autoload
(xref-backend-identifier-at-point (xref-find-backend)))))
(if identifier
(let ((xref-prompt-for-identifier nil))
+ (mouse-set-point event)
(xref-find-references identifier))
(user-error "No identifier here"))))