Function: xref-find-definitions-at-mouse
xref-find-definitions-at-mouse is an autoloaded, interactive and
byte-compiled function defined in xref.el.gz.
Signature
(xref-find-definitions-at-mouse EVENT)
Documentation
Find the definition of identifier at or around mouse click.
This command is intended to be bound to a mouse event.
Probably introduced at or before Emacs version 27.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
;;;###autoload
(defun xref-find-definitions-at-mouse (event)
"Find the definition of identifier at or around mouse click.
This command is intended to be bound to a mouse event."
(interactive "e")
(let ((identifier
(save-excursion
(mouse-set-point event)
(xref-backend-identifier-at-point (xref-find-backend)))))
(if identifier
(xref-find-definitions identifier)
(user-error "No identifier here"))))