From: xenodasein--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>, michael_heerdegen@web.de
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Explanation Request for the Function set-transient-map in subr.el
Date: Sun, 28 Nov 2021 21:48:47 +0100 (CET) [thread overview]
Message-ID: <MpcIf1o--7-2@tutanota.de> (raw)
In-Reply-To: <jwvilwcysm8.fsf-monnier+Inbox@gnu.org>
> This tests whether the user typed a key-sequence from `map` as opposed
> to some other one.
>
> E.g. when you use `text-scale-adjust`, you want to "stay" in the
> transient map as long as the user uses one of the keys in the `map`
> (basically, +, -, or 0) and if the user types some other key, we
> immediately/automatically exit from this transient map.
>
> Stefan
> As Stefan and the comment tried to describe: this checks whether the
> execution of current command happened using a key binding from the
> transient MAP.
> What are the possible values of mc here on the last line?
> This test is done to fullfill this part of the docstring:
>| [...] if the optional argument KEEP-PRED is t, MAP stays active if a
>| key from MAP is used
> If this is the case, it's as you described, and the test succeeds. But
> when the current command has not been invoked using a binding in the
> transient map, mc is `nil' and the `eq'ality test fails as we want to
> disable the transient map.
But then, isn't that second expression redundant? Lookup key is already looking
in our transient map, if it succeeds mc will be non-nil and equal this-command,
if it does not, 'and' will return nil anyway?
next prev parent reply other threads:[~2021-11-28 20:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 18:10 Explanation Request for the Function set-transient-map in subr.el xenodasein--- via Users list for the GNU Emacs text editor
2021-11-12 14:41 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-11-14 12:08 ` FWD: " xenodasein--- via Users list for the GNU Emacs text editor
2021-11-14 13:04 ` xenodasein--- via Users list for the GNU Emacs text editor
2021-11-14 23:13 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-11-28 18:12 ` xenodasein--- via Users list for the GNU Emacs text editor
2021-11-28 19:17 ` Michael Heerdegen
2021-11-28 19:45 ` Stefan Monnier
2021-11-28 20:48 ` xenodasein--- via Users list for the GNU Emacs text editor [this message]
2021-11-28 21:07 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-11-28 21:24 ` Michael Heerdegen
2021-11-28 22:29 ` xenodasein--- via Users list for the GNU Emacs text editor
2021-11-28 22:44 ` xenodasein--- via Users list for the GNU Emacs text editor
2021-11-29 10:28 ` Michael Heerdegen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MpcIf1o--7-2@tutanota.de \
--to=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
--cc=xenodasein@tutanota.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).