+(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")
If we use
(defun xref-find-definitions-at-mouse (&optional event)
"Find the definition of identifier at or around mouse click.
This command is intended to be bound to a mouse event."
(interactive (list last-nonmenu-event))
then this command will also work with non-mouse events.
Stefan
PS: No, I don't know why we usually use last-nonmenu-event rather
than last-command-event or last-input-event for those commands.