From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Additional cleanup around xterm-mouse Date: Sat, 19 Dec 2020 23:26:20 -0800 Message-ID: <831dc4a610325c009c5a10c48fe459e5@finder.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> Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29703"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.3.15 Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 20 08:27:46 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 1kqt85-0007bL-AR for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Dec 2020 08:27:45 +0100 Original-Received: from localhost ([::1]:40478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqt84-0007fR-D9 for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Dec 2020 02:27:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqt6s-0006lz-8b for emacs-devel@gnu.org; Sun, 20 Dec 2020 02:26:30 -0500 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:44756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqt6p-0003f6-Hg; Sun, 20 Dec 2020 02:26:29 -0500 Original-Received: from mail.finder.org (greenhill.hpalace.com [IPv6:2600:3c01::f03c:91ff:fe73:2daa]) by greenhill.hpalace.com (Postfix) with ESMTPSA id C253D5BB; Sun, 20 Dec 2020 07:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=finder.org; s=2018; t=1608449180; bh=XK1+sNOE598XrD/WByoIvKj7dqyqb18o+ihIXFHRuNI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wK1zQl/CiGpFU1QxLkvgOOqM9EBvzRPi3RrYAL+ywtwkZteytJJVdLvVZLZD4ulgr 27p5/395S8gkpmab/vbLsBuP6r6zrH5n3UPnZCnFerZEsKuoQ+PDW7LRJiHW/BN2Fc B/CvIOL0L0gY/kRyzWvldoOhmJq9QqzPoHXocXrB2gQqztChQ018zRk9QnqF70Et+2 WE+ptP0mwxrdeka6s8W3yendeidEwlCUvjTGmNpjcuYW9PxDcLIa8rOZ38OiM2E9d4 sRNPuy7XhCBJcr/VF0e2FSWRjkYL2XfuBh3oOVqjZjhHnnMQ//G/2YIV61ETxxCkVG CMngC6/bTqHoQ== In-Reply-To: X-Sender: jared@finder.org Received-SPF: pass client-ip=192.155.80.58; envelope-from=jared@finder.org; helo=greenhill.hpalace.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:261313 Archived-At: On 2020-12-19 2:50 pm, Stefan Monnier wrote: >> Let's see what Stefan suggests here. Stefan? > > I'm afraid I don't have much time to think about this. > > My suggestion is to add an option to `read-key` which makes it ignore > `function-key-map` and all other hardcoded remappings that are only > applied when a key sequence is not bound (i.e. those remappings which > could/should conceptually be applied by `function-key-map` but aren't > for various historical/technical reasons, such as dropping `down` > events, > demoting `drag` events, downcasing letters, ...). > > At the level of `read-key-sequence` this should use the > `dont-downcase-last` argument (since `read-key` only reads one event, > it's OK if `read-key-sequence` only applies it to the last event). This sounds straightforward to me to implement. The only question I have is how to handle backward compatibility. I see a few options: 1. Change the behavior of the dont-downcase-last parameter to this more extensive meaning. Update global-set-key (the only other caller who sets dont-downcase-last in Emacs' code) to take this new behavior into account. 2. Make the dont-downcase-last parameter have the new behavior only if it is passed some new value (for example: 'all-fallbacks). Leave the existing behavior for any other value, especially 'nil and 't. 3. [My preference] Like 2, but with a deprecation message on values other than 'nil, 'all-fallbacks, or 't (or maybe 'downcase-last if we want full explicitness). This allows maximal ability to define new behaviors in the future. 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? -- MJF