From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: mouse-face and help echo support for xterm mouse Date: Wed, 04 Nov 2020 09:13:07 -0500 Message-ID: References: <31ff05295c806c4596c54fdcc8994a5f@finder.org> <3e7e0f6d1e272d03913e97254b2eabff@finder.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="30231"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Jared Finder via \"Emacs development discussions.\"" To: Jared Finder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 04 15:13:48 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 1kaJXo-0007mT-7A for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 15:13:48 +0100 Original-Received: from localhost ([::1]:39042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaJXn-0002T2-7g for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 09:13:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaJXH-000235-Sa for emacs-devel@gnu.org; Wed, 04 Nov 2020 09:13:15 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaJXE-0006pj-Kz for emacs-devel@gnu.org; Wed, 04 Nov 2020 09:13:14 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EECD0440AF8; Wed, 4 Nov 2020 09:13:09 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 87434440AF2; Wed, 4 Nov 2020 09:13:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604499188; bh=qpRmXlbm+tYCNTCR3xDYUkoUGJY0geOwMzd21Vg4/KU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hJ3OqtVPcIV7Qg+bHqfWbC1OLvaaweoTrjCSBmjWaIn9yDsrp2Yc4OsHIQ7YIbMOr voOCI+J4p74gaN2W2pWqBpA7NZODtKASQA5iqACICwAqJIzIbEkAD9qPeC4JXDnxUq GnCyg6vxWbsgltBjbEghavl+493IWCPwR1I3/Fl3KM1dZz8sMHPYaDtndnWQdqRP42 3xYJ4rh5+Pgx+Db3AzwofoEnO0lqWcTLNFC5/gZTz0av6pjyHzLoqexaXbSYgVd0vK PpJ9gM7PkRiOxkp+Oz9+nDdrYwdxD8/tQQPyaQmcZ6jhLdc8KEYytSV2bMqLGzAeOz 21pA4YX/yb++w== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 63D60120200; Wed, 4 Nov 2020 09:13:08 -0500 (EST) In-Reply-To: <3e7e0f6d1e272d03913e97254b2eabff@finder.org> (Jared Finder's message of "Tue, 03 Nov 2020 22:54:32 -0800") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 09:13:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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.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:258675 Archived-At: > Toward proving that the code could be shared, I refactored the GPM mouse > logic so that it was clearly apparent how to share it with > handle-lisp-mouse-motion. That patch is attached. I'd like to make sure > this looks like an appropriate change to make. If so, I will finish up > the patch. Hmm... this `handle_one_term_event` seems weirdly complex. I don't understand it enough to judge if your rewrite is OK. > 1. To enable sharing logic, I need to encode a handful of assumptions that > I believe are true today (example: no need to handle quit-char in GPM > handling). Do these assumptions look reasonable? I don't know. I don't even know why `hold_quit` is called that way: I can't see any reason why it should hold "quit" events more than anything else. In the patch below I slightly tweaked the code to simplify the control flow a tiny bit and to follow our coding convention on placement of braces, and more importantly I added assertions which I believe always hold along with comments pointing out things I don't understand. Could someone help me clarify what's going on? > 2. In what file should such a shared function go? My initial thought is > a new file "mouse.c" as it would hold shared mouse logic. I suspect it would end up being fairly empty, and while I hate the monster xdisp.c file, I also don't really like tiny files, so I'd prefer if we could find a better home for it. Stefan