emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 455a236: New function 'xref-find-definitions-at


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 455a236: New function 'xref-find-definitions-at-mouse'
Date: Mon, 09 Jul 2018 09:55:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> +(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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]