From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 455a236: New function 'xref-find-definitions-at-mouse' Date: Mon, 09 Jul 2018 09:55:18 -0400 Message-ID: References: <20180707090050.359.98328@vcs0.savannah.gnu.org> <20180707090052.4B7F9204E8@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531144414 21911 195.159.176.226 (9 Jul 2018 13:53:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 13:53:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Tobias Gerdin , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 09 15:53:30 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcWba-0005bK-7w for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2018 15:53:30 +0200 Original-Received: from localhost ([::1]:42190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcWdh-0008RO-4C for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2018 09:55:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcWdR-0008Q1-VG for emacs-devel@gnu.org; Mon, 09 Jul 2018 09:55:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcWdO-0005LF-OH for emacs-devel@gnu.org; Mon, 09 Jul 2018 09:55:25 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcWdO-0005JW-Fo; Mon, 09 Jul 2018 09:55:22 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w69Dtwut003550; Mon, 9 Jul 2018 09:55:58 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id DD37967A55; Mon, 9 Jul 2018 09:55:18 -0400 (EDT) In-Reply-To: <20180707090052.4B7F9204E8@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Sat, 7 Jul 2018 05:00:51 -0400 (EDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6325=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6325> : inlines <6742> : streams <1792048> : uri <2670973> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227153 Archived-At: > +(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.