From: Jambunathan K <kjambunathan@gmail.com>
To: Chong Yidong <cyd@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: set-temporary-overlay-map seems poorly named
Date: Sun, 22 Dec 2013 19:49:10 +0530 [thread overview]
Message-ID: <878uvdufxd.fsf@gmail.com> (raw)
In-Reply-To: <87r496pwy0.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 21 Dec 2013 11:28:15 +0530")
Jambunathan K <kjambunathan@gmail.com> writes:
> Chong Yidong <cyd@gnu.org> writes:
>
>> This function, new in Emacs 24.4, seems to have nothing to do with
>> overlays in the usual Emacs sense. So it's a bad name.
>>
>> How about renaming it to `set-transient-keymap'?
>
> How about `set-temporary-keymap'?
The following node already uses TEMP-MAP to designate this.
,---- (info "(elisp) Searching Keymaps")
|
| TEMP-MAP is a pseudo variable that represents the effect of a
| `set-temporary-overlay-map' call.
|
`----
----------------------------------------------------------------
,---- C-h f set-temporary-overlay-map
|
| Normally, MAP is used only once. If the optional argument
| KEEP-PRED is t, MAP stays active if a key from MAP is used.
| KEEP-PRED can also be a function of no arguments: if it returns
| non-nil then MAP stays active.
|
`----
In essence the map is "self-destructive". The installer ALSO tells when
the transient map goes belly up.
I believe the notion of "self-destructive" is semantically more richer
than "transient" or "temporary".
----------------------------------------------------------------
Looking at instances where `set-temporary-keymap' is used, it seems it
helps to "extend" a command to an arbitrary length.
C-x {z}+
C-x TAB {left or right}+
C-x C-+ {+ or - or 0}+
It is looks as if a "common prefix" is factored out of a key sequence.
So a key sequence like
AB AC AD
becomes "reduced" to
A B C D
i.e., A is "factored out".
So overlay-map in effects helps to create "command local" maps or to
create "sub-commands".
----------------------------------------------------------------
next prev parent reply other threads:[~2013-12-22 14:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-21 5:45 set-temporary-overlay-map seems poorly named Chong Yidong
2013-12-21 5:58 ` Jambunathan K
2013-12-22 14:19 ` Jambunathan K [this message]
2013-12-22 16:50 ` Jambunathan K
2013-12-21 8:26 ` Eli Zaretskii
2013-12-22 0:36 ` Chong Yidong
2013-12-22 8:38 ` Bozhidar Batsov
2013-12-22 10:48 ` Stefan Monnier
2013-12-22 13:43 ` Chong Yidong
2013-12-23 1:27 ` Stefan Monnier
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=878uvdufxd.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
/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.