From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse Date: Thu, 31 Aug 2023 08:43:04 +0800 Message-ID: <87il8wt52f.fsf@yahoo.com> References: <169344150641.11482.13012085201452768898@vcs2.savannah.gnu.org> <20230831002506.C0C6DC038B5@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29614"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 31 02:44:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qbVnD-0007Xn-8C for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Aug 2023 02:44:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbVmL-000191-RN; Wed, 30 Aug 2023 20:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbVmK-00018V-6e for emacs-devel@gnu.org; Wed, 30 Aug 2023 20:43:20 -0400 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbVmH-0005rF-8C for emacs-devel@gnu.org; Wed, 30 Aug 2023 20:43:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693442595; bh=fArNrh9AG70XI6EsBa6C52CcCtoGlvFfmQmQnyZVwys=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=cwpN0rmaGjnVSLXgEIjwWVmf8U/bx29UYcrKQrGEfVxUOcCcp1x0JVaOax2AWQdexdHYcWzEnM9GPE6yYgm0qfrwvMIUr25aNi70RU7tbfDVH+cINe1hKFIRTjAF1iQtAULOqOdmsvmBULwW0x4Cy9ED87nQBm/6CqDjSK4KEG9DUf3EtRi8lz6pA5ACq6FhAwTs4qceSY5spcHuKCVfh2hZ3x11v+1h4PzfdJDSVYAr0JGzm+YPp/97mif9qHoFIsIKoFWQPz1ZmKADvV9ZKDrH7aPxBEP25oFTZUKK6d01fi7R2YsGtB/cVxfpxeYaF9JO260xMV3n8dInpi5C2g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693442595; bh=Wq5sk5I/FbxMmqBMfF7FfbVVEfvkLV9jzs5WIPtIOPT=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=g28hFGoV7JdwV20NN3XF9ZgKO02EPul04s+9F7xl1LISTjcuz56cbbuvO53b6/RtOFeZWhrR7549+AgXF4lwIZWOYOx/DqanKbmjtikPcN+Cdc6iwyw6WB/gn6cWVoRts18PYSm3ZxooaTQn8ooZ4FFLmTstsUToWcn7cZ2GMyAjwEpAUEBW9pfSzA0rAN+dnvLh3+OBrdbqJ1rgaolnrHkverQ+/1u/PKEVXut5+vVqX+rLX/9FWsyMZ/RpdzAn5Q7s2Rj+ya4F0XBXAdPH0RHVLYbE++0IZVu/IF9jiJDNeBpo2lWwHb2kD+p4uUM329otd4OYgeMxfvRWdEk3fg== X-YMail-OSG: hHGq0hEVM1kgXKbIAPnzz6wmGjDgV2.tz7DqC2CqecYfP4pJhE2jWBq567oU6jm 1xhHZHGnc_ACfW0PH2JVyVcU8tIpYuTvLHrbUooJ5BGHpWdEusljAN3h6yM58cuB3mD9HbsNr2k9 U74oTgW2wo3Nn7D7mk9jeKRJUvSh776k1o6tmqty_Kqz3DTfuLxx.g3AeXDm6wJSM3WQh58dbBtp hLQlh_prgDxil34jnevv2zCQ54j9JU171zdfQ0XscyaTZY_USdz_C5WCBi8GPnn7J43xscqfIe2S sGKJSbDaDkIw3BaUVhObiQgp_0Ic5whcWzGaIfkAftCmvzEPGlmu0JpG_JH8L1TO155ph.4FPtrz lSU5PIs9pjr_W3kBaeMRR_rnfF0Vtsr2fP8mEzzrKbn5Q0E5q56NbFQuNGE89HR4NZP6hpvF7DFa ZV4U1mCyadW4PoYDSEQ_iefJctUPh1Q6Y6dK7dNkIlQtqiCmAJCKzVZ_1ukTWt0gQ6DffG9_OdoV CSfCucF8Gd_ZWMqM4lfqgl5Kkha7iHicAKyaZES9tE9XhUgRkvOZzlpOoJTy1G0cRMbijRKp5iKU XEyJ4T3fs0aFgt51dRLsSCgkhmAxBwb4SF3o7bsfNtEyAwfYyAgImBmOz.QTFeeJFg7TJz3yU3XW 87byJ5HLqAVypw84GC1NlzKKZi2hYInlN2EZEUijQLocIWl.nQunFyVe77YEWPRnX0oxp9E_ooVG CL7njTrSUnzPbNsbZFQGrQbBET0bW5zk8fejmPZJjJg9SSoh9SGJ8w8WNL2lInccVzCPLKnlsw7t tPTmBhE2XOYLcp2UzB4hmT9GunHBscmCQTK91f5_Tq X-Sonic-MF: X-Sonic-ID: a6df683e-a469-44e4-8a26-3384771f4899 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Thu, 31 Aug 2023 00:43:15 +0000 Original-Received: by hermes--production-sg3-69654d8bd-gltbk (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID afa5af4a2501be99e6a5744370a82026; Thu, 31 Aug 2023 00:43:11 +0000 (UTC) In-Reply-To: <20230831002506.C0C6DC038B5@vcs2.savannah.gnu.org> (Dmitry Gutov's message of "Wed, 30 Aug 2023 20:25:06 -0400 (EDT)") X-Mailer: WebService/1.1.21763 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.33; envelope-from=luangruo@yahoo.com; helo=sonic308-10.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309568 Archived-At: Dmitry Gutov writes: > branch: master > commit 128ed5c9f17fab87fdb679326035aa2598612658 > Author: Dmitry Gutov > Commit: Dmitry Gutov > > Add one more mouse-set-point call to functions xref-find-*-at-mouse > > * lisp/progmodes/xref.el (xref-find-definitions-at-mouse) > (xref-find-references-at-mouse): Call mouse-set-point to ensure > that the search is initiated at the same place where > xref-backend-identifier-at-point was called (bug#65578). > --- > lisp/progmodes/xref.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index 3f75f8d7132..dbafa00c3ad 100644 > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -1638,7 +1638,9 @@ This command is intended to be bound to a mouse event." > (mouse-set-point event) > (xref-backend-identifier-at-point (xref-find-backend))))) > (if identifier > - (xref-find-definitions identifier) > + (progn > + (mouse-set-point event) > + (xref-find-definitions identifier)) > (user-error "No identifier here")))) > > ;;;###autoload > @@ -1652,6 +1654,7 @@ This command is intended to be bound to a mouse event." > (xref-backend-identifier-at-point (xref-find-backend))))) > (if identifier > (let ((xref-prompt-for-identifier nil)) > + (mouse-set-point event) > (xref-find-references identifier)) > (user-error "No identifier here")))) > My experience with the entire touch screen affair says that many such errors would never have been written had `xref-find-definitions' taken an EVENT argument and used its posn-point if present. Something to consider, I suppose.