From: Eli Zaretskii <eliz@gnu.org>
To: Jared Finder <jared@finder.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Additional cleanup around xterm-mouse
Date: Sat, 09 Jan 2021 14:27:48 +0200 [thread overview]
Message-ID: <83v9c6gurf.fsf@gnu.org> (raw)
In-Reply-To: <3dfd7f9e390fa3e1a6fedfdd646834ae@finder.org> (message from Jared Finder on Sat, 02 Jan 2021 14:20:06 -0800)
> Date: Sat, 02 Jan 2021 14:20:06 -0800
> From: Jared Finder <jared@finder.org>
> 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 <f7> and <right>, or mouse events generated by `xterm-mouse-mode'.
Please use upper case for function keys: <F7> and <RIGHT>.
next prev parent reply other threads:[~2021-01-09 12:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-26 23:49 Additional cleanup around xterm-mouse Jared Finder via Emacs development discussions.
2020-12-27 15:36 ` Stefan Monnier
2020-12-27 16:30 ` Jared Finder via Emacs development discussions.
2020-12-27 17:10 ` Stefan Monnier
2020-12-28 0:22 ` Jared Finder via Emacs development discussions.
2021-01-02 8:17 ` Eli Zaretskii
2021-01-02 22:20 ` Jared Finder via Emacs development discussions.
2021-01-09 12:27 ` Eli Zaretskii [this message]
2021-01-09 23:01 ` Jared Finder via Emacs development discussions.
2021-01-15 11:54 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2020-11-16 6:29 Jared Finder via Emacs development discussions.
2020-11-16 17:30 ` Jared Finder via Emacs development discussions.
2020-11-18 17:40 ` Eli Zaretskii
2020-11-19 8:03 ` Jared Finder via Emacs development discussions.
2020-11-21 9:31 ` Eli Zaretskii
2020-11-22 23:56 ` Jared Finder via Emacs development discussions.
2020-11-28 16:36 ` Eli Zaretskii
2020-12-01 7:36 ` Jared Finder via Emacs development discussions.
2020-12-01 15:21 ` Stefan Monnier
2020-12-01 18:23 ` Eli Zaretskii
2020-12-02 6:45 ` Jared Finder via Emacs development discussions.
2020-12-02 16:53 ` Stefan Monnier
2020-12-03 5:46 ` Jared Finder via Emacs development discussions.
2020-12-03 14:45 ` Stefan Monnier
2020-12-03 17:31 ` Jared Finder via Emacs development discussions.
2020-12-14 0:54 ` Jared Finder via Emacs development discussions.
2020-12-14 15:32 ` Eli Zaretskii
2020-12-16 5:30 ` Jared Finder via Emacs development discussions.
2020-12-19 18:32 ` Eli Zaretskii
2020-12-19 22:50 ` Stefan Monnier
2020-12-20 7:26 ` Jared Finder via Emacs development discussions.
2020-12-20 14:07 ` Stefan Monnier
2020-12-20 23:27 ` Jared Finder via Emacs development discussions.
2020-12-23 16:52 ` Eli Zaretskii
2020-12-23 17:21 ` Jared Finder via Emacs development discussions.
2020-12-24 18:43 ` Eli Zaretskii
2020-12-14 0:36 ` Jared Finder via Emacs development discussions.
2020-11-21 17:00 ` Stefan Monnier
2020-11-21 8:23 ` Eli Zaretskii
2020-11-15 8:49 Jared Finder via Emacs development discussions.
2020-11-15 18:11 ` 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=83v9c6gurf.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.