From: Eli Zaretskii <eliz@gnu.org>
To: Jared Finder <jared@finder.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: mouse-face and help echo support for xterm mouse
Date: Wed, 04 Nov 2020 17:19:57 +0200 [thread overview]
Message-ID: <83pn4tb142.fsf@gnu.org> (raw)
In-Reply-To: <3e7e0f6d1e272d03913e97254b2eabff@finder.org> (emacs-devel@gnu.org)
> Date: Tue, 03 Nov 2020 22:54:32 -0800
> Cc: "Jared Finder via \"Emacs development discussions.\"" <emacs-devel@gnu.org>
> From: Jared Finder via "Emacs development discussions." <emacs-devel@gnu.org>
>
> 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.
Thanks, see below.
> Two specific questions:
>
> 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?
Not sure why is this important. You want to remove the hold_quit
stuff from the code? I don't see that it complicates the code, so I'd
suggest not to waste your time on worrying about it. Just leave it
alone.
> 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.
No, new file for a single function is too much. dispnew.c, I guess.
> while (gpm = Gpm_GetEvent (&event), gpm == 1) {
> - nread += handle_one_term_event (tty, &event, &gpm_hold_quit);
> + nread += handle_one_term_event (tty, &event);
As explained above, I'd leave the signature alone, because it is not
guaranteed that every subroutine we call here doesn't need to use it.
> - if (ie.kind != NO_EVENT)
I also don't think it's a good idea to remove this test. The
functions you call don't guarantee to always return a meaningful
event, and the assertion you leave instead is too drastic: imagine
that it happens to some innocent user.
> + kbd_buffer_store_event_hold (&ie, NULL);
If we eventually decide not to use the hold_quit stuff, you can just
call kbd_buffer_store_event here.
Thanks.
next prev parent reply other threads:[~2020-11-04 15:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 5:46 mouse-face and help echo support for xterm mouse Jared Finder via Emacs development discussions.
2020-11-01 13:39 ` Stefan Monnier
2020-11-01 15:56 ` Jared Finder via Emacs development discussions.
2020-11-04 6:54 ` Jared Finder via Emacs development discussions.
2020-11-04 14:13 ` Stefan Monnier
2020-11-04 15:46 ` Eli Zaretskii
2020-11-04 15:56 ` Stefan Monnier
2020-11-04 17:54 ` Jared Finder via Emacs development discussions.
2020-11-04 18:47 ` Stefan Monnier
2020-11-04 18:51 ` Eli Zaretskii
2020-11-04 19:05 ` Stefan Monnier
2020-11-04 19:10 ` Jared Finder via Emacs development discussions.
2020-11-04 15:19 ` Eli Zaretskii [this message]
2020-11-05 8:15 ` Jared Finder via Emacs development discussions.
2020-11-05 14:45 ` Stefan Monnier
2020-11-05 19:58 ` Jared Finder via Emacs development discussions.
2020-11-05 20:18 ` Stefan Monnier
2020-11-06 5:23 ` Jared Finder via Emacs development discussions.
2020-11-06 6:00 ` Eli Zaretskii
2020-11-06 6:46 ` Jared Finder via Emacs development discussions.
2020-11-06 7:39 ` Eli Zaretskii
2020-11-07 1:22 ` Jared Finder via Emacs development discussions.
2020-11-14 12:38 ` Eli Zaretskii
2020-11-14 12:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pn4tb142.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jared@finder.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.