From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Additional cleanup around xterm-mouse Date: Wed, 23 Dec 2020 18:52:37 +0200 Message-ID: <83lfdopiqy.fsf@gnu.org> References: <83o8jupnqd.fsf@gnu.org> <838savys2v.fsf@gnu.org> <3e3933d8ec1d5d3f6809385a8ac5f447@finder.org> <83mtz1moa5.fsf@gnu.org> <0ea60a4f2a7fb0698f84ac5957cafef3@finder.org> <83mtyxgzck.fsf@gnu.org> <2eac7957a7c20af3517a3ad0862a5b39@finder.org> <106c6d31ef09b83042ef0fab5ac0ed88@finder.org> <505d1b561cde375d1c6a55a738cd553d@finder.org> <83ft48csj5.fsf@gnu.org> <83bleptzng.fsf@gnu.org> <831dc4a610325c009c5a10c48fe459e5@finder.org> <858d85fc265455042479cb4c9a72b4a5@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8227"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Jared Finder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 23 17:53:18 2020 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 1ks7O2-00024l-Hd for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Dec 2020 17:53:18 +0100 Original-Received: from localhost ([::1]:32870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks7O1-0000TC-Jo for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Dec 2020 11:53:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks7NW-0008Rz-EU for emacs-devel@gnu.org; Wed, 23 Dec 2020 11:52:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52898) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks7NV-0006gY-Og; Wed, 23 Dec 2020 11:52:45 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3532 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ks7NV-0001Zt-7o; Wed, 23 Dec 2020 11:52:45 -0500 In-Reply-To: <858d85fc265455042479cb4c9a72b4a5@finder.org> (message from Jared Finder on Sun, 20 Dec 2020 15:27:10 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:261618 Archived-At: > Date: Sun, 20 Dec 2020 15:27:10 -0800 > From: Jared Finder > Cc: Eli Zaretskii , emacs-devel@gnu.org > > >> I like #3 as existing code would run unchanged. The chance that any > >> existing code passed 'all-fallbacks is extremely low. And anyone > >> supporting > >> a package outside of Emacs passing some other value will notice the > >> message > >> when they upgrade to Emacs 28. > >> > >> Thoughts? > > > > By order of preference, I'd say: #1, then #3 and finally #2. > > But any one of those 3 is OK for me. > > Sounds good to me! Eli, do you have a preference here? I'd like to make > sure I implement the right option. I'm afraid I've lost context here. Your suggestion was to use this: > +(defun read-potential-mouse-event () > + "Read an event that might be a mouse event. > + > +This function exists for backward compatibility in code packaged > +with Emacs. Do not call it directly in your own packages." > + (if xterm-mouse-mode > + (read-key nil t) > + (read-event))) This uses read-key when xterm-mouse-mode is in use, otherwise uses read-event as we did before. But now the discussion is about read-key only, and also about read-key-sequence, which was not on the table at all, AFAIR? There seems to be some gap here that I couldn't bridge upon. So I'm sorry for slowing you down, but could you explain how the 3 possibilities you describe are related to the original issue, which was that read-event is insufficient to support xterm-mouse-mode in those places? TIA