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: Sat, 09 Jan 2021 14:27:48 +0200 Message-ID: <83v9c6gurf.fsf@gnu.org> References: <831rf3g3cs.fsf@gnu.org> <3dfd7f9e390fa3e1a6fedfdd646834ae@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28558"; 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 Sat Jan 09 13:42:40 2021 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 1kyDZn-0007L6-Mn for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 13:42:39 +0100 Original-Received: from localhost ([::1]:55430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyDZm-00079V-OD for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 07:42:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyDLO-0000LL-J5 for emacs-devel@gnu.org; Sat, 09 Jan 2021 07:27:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58853) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyDLN-0006JD-Id; Sat, 09 Jan 2021 07:27:45 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4138 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kyDLL-0006Xu-56; Sat, 09 Jan 2021 07:27:43 -0500 In-Reply-To: <3dfd7f9e390fa3e1a6fedfdd646834ae@finder.org> (message from Jared Finder on Sat, 02 Jan 2021 14:20:06 -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:262797 Archived-At: > Date: Sat, 02 Jan 2021 14:20:06 -0800 > From: Jared Finder > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > > > LGTM. I didn't review the documentation changes, since they are > > incomplete and somewhat outdated; I will do that when you post the > > final result. > > Thanks! I did a pass over the comments now. Updated (hopefully final) > patch attached. Thanks. > For backward compatibility purposes, the above logic is contained in a > new internal-only function: 'read-potential-mouse-event'. Should 'read-potential-mouse-event' be named 'read--potential-mouse-event', to signal its being an internal function? > +(defconst read-key-full-map > + (let ((map (make-sparse-keymap))) > + (define-key map [t] 'dummy) Can we have either a doc string or a comment explaining the need and the use of this function? > +If the optional argument DISABLE-FALLBACKS is non-nil, all > +unbound fallbacks usually done by `read-key-sequence' are > +disabled such as discarding mouse down events. This is generally > +what you want as `read-key' temporarily removes all bindings. The last sentence here is confusing, and even alarming: what is meant "removing all bindings" there? This needs to be explained or reworded. > +Otherwise, only downcasing of the last event is disabled." I think this also needs a clearer wording. First, "Otherwise" is ambiguous: do you mean if DISABLE-FALLBACKS is nil or omitted, or do you mean something else? And second, the "downcasing of the last event" part was not described anywhere, so it is a mystery for the reader. > + ;; FIXME: Audit existing usage of `read-key' to see if they ^^^^^ "uses", I think. It will also better fit with "they". > +;; FIXME: Once there's a safe way to transition away from read-event, > +;; this function should be deleted. When the function is deleted, we will also need to make other changes, like replace its use with something else, right? Then please say that here. > DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, > doc: /* Read an event object from the input stream. > + > +If you want to read non-character events consider calling `read-key' ^ A comma is missing there. > +instead. `read-key' will decode events via `input-decode-map' that > +`read-event' will not. On a terminal this includes function keys such > +as and , or mouse events generated by `xterm-mouse-mode'. Please use upper case for function keys: and .