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: Tobias Gerdin
Subject: Re: [Emacs-diffs] master 455a236: New function 'xref-find-definitions-at-mouse'
Date: Mon, 9 Jul 2018 21:52:49 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.0

Den 2018-07-09 kl. 15:55, skrev Stefan Monnier:

+(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.
I'm afraid I do not see the point of making it work without mouse events? Would that be in the interest of merging it with 'xref-find-definitions' somehow?

-Tobias




reply via email to

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